From 0b8979e5b53896e4f788fdaa771c853520a11f8c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 31 May 2023 23:55:12 +0200 Subject: 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... --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-54-g00ecf