aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-12-20 23:30:18 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-12-20 23:33:16 +0100
commit605c313e46bdffb0f572c64bd4f3e1336d8c9896 (patch)
tree88116b54aeae32034db37a88058d113bc5d120c3
parentcaddcbabe27848bdac05afd885d918ea4a0e8bae (diff)
global-functions: $ScriptInstallUpdate: simplify code
-rw-r--r--global-functions7
1 files changed, 1 insertions, 6 deletions
diff --git a/global-functions b/global-functions
index 8b0e6cb..192e326 100644
--- a/global-functions
+++ b/global-functions
@@ -569,7 +569,6 @@
}
:foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
- :local Ignore 0;
:local ScriptVal [ / system script get $Script ];
:local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ];
:local SourceNew;
@@ -595,11 +594,7 @@
:if ([ :len $SourceNew ] = 0 && $ScriptUpdatesFetch = true) do={
:local Comment [ $ParseKeyValueStore ($ScriptVal->"comment") ];
- :if ($Comment->"ignore" = true) do={
- :set Ignore 1;
- }
-
- :if ($Ignore = 0) do={
+ :if (!($Comment->"ignore" = true)) do={
$LogPrintExit debug ("Fetching script from url: " . $ScriptVal->"name") false;
:do {
:local BaseUrl $ScriptUpdatesBaseUrl;