mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00: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:
@@ -832,7 +832,7 @@
|
||||
:local ReloadGlobalConfig false;
|
||||
: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 ScriptFile [ /file/find where name=("script-updates/" . $ScriptVal->"name") . ".rsc" ];
|
||||
:local SourceNew;
|
||||
|
Reference in New Issue
Block a user