mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $ScriptInstallUpdate: simplify code
This commit is contained in:
@ -569,7 +569,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
|
:foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
|
||||||
:local Ignore 0;
|
|
||||||
:local ScriptVal [ / system script get $Script ];
|
:local ScriptVal [ / system script get $Script ];
|
||||||
:local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ];
|
:local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ];
|
||||||
:local SourceNew;
|
:local SourceNew;
|
||||||
@ -595,11 +594,7 @@
|
|||||||
|
|
||||||
:if ([ :len $SourceNew ] = 0 && $ScriptUpdatesFetch = true) do={
|
:if ([ :len $SourceNew ] = 0 && $ScriptUpdatesFetch = true) do={
|
||||||
:local Comment [ $ParseKeyValueStore ($ScriptVal->"comment") ];
|
:local Comment [ $ParseKeyValueStore ($ScriptVal->"comment") ];
|
||||||
:if ($Comment->"ignore" = true) do={
|
:if (!($Comment->"ignore" = true)) do={
|
||||||
:set Ignore 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ($Ignore = 0) do={
|
|
||||||
$LogPrintExit debug ("Fetching script from url: " . $ScriptVal->"name") false;
|
$LogPrintExit debug ("Fetching script from url: " . $ScriptVal->"name") false;
|
||||||
:do {
|
:do {
|
||||||
:local BaseUrl $ScriptUpdatesBaseUrl;
|
:local BaseUrl $ScriptUpdatesBaseUrl;
|
||||||
|
Reference in New Issue
Block a user