aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-05-31 23:55:12 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-06-01 21:59:52 +0200
commit0b8979e5b53896e4f788fdaa771c853520a11f8c (patch)
tree05c34d6e654eb838b4a042002cbd37efdc4b0fad
parentde8c534d41dbb6dd46e8a6b89d53cf4b34f3953d (diff)
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...
-rw-r--r--global-functions.rsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index c2c01ea..833a595 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -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;