mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 18:14:27 +02:00
global-functions: $ScriptInstallUpdate: handle scripts with DOS line endings
If the script is converted to DOS line endings (\r\n) on the device it was no longer handled by $ScriptInstallUpdate. Let's change that...
This commit is contained in:
parent
de8c534d41
commit
0b8979e5b5
1 changed files with 1 additions and 1 deletions
|
@ -832,7 +832,7 @@
|
||||||
:local ReloadGlobalConfig false;
|
:local ReloadGlobalConfig false;
|
||||||
:local UserAgent ("User-Agent: Mikrotik/" . [ /system/resource/get version ] . " Fetch");
|
:local UserAgent ("User-Agent: Mikrotik/" . [ /system/resource/get version ] . " Fetch");
|
||||||
|
|
||||||
:foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\n" ] do={
|
:foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\r?\n" ] do={
|
||||||
:local ScriptVal [ /system/script/get $Script ];
|
:local ScriptVal [ /system/script/get $Script ];
|
||||||
:local ScriptFile [ /file/find where name=("script-updates/" . $ScriptVal->"name") . ".rsc" ];
|
:local ScriptFile [ /file/find where name=("script-updates/" . $ScriptVal->"name") . ".rsc" ];
|
||||||
:local SourceNew;
|
:local SourceNew;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue