mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-23 10:08:40 +02:00
global-functions: $ScriptInstallUpdate: move code into block
This commit is contained in:
parent
469f783a92
commit
3ccaafd1b3
1 changed files with 7 additions and 3 deletions
|
@ -1163,7 +1163,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if (!($ScriptInfo->"ignore" = true)) do={
|
:do {
|
||||||
|
:if ($ScriptInfo->"ignore" = true) do={
|
||||||
|
$LogPrint debug $0 ("Ignoring script '" . $ScriptVal->"name" . "', as requested.");
|
||||||
|
:error true;
|
||||||
|
}
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
:local BaseUrl [ $EitherOr ($ScriptInfo->"base-url") $ScriptUpdatesBaseUrl ];
|
:local BaseUrl [ $EitherOr ($ScriptInfo->"base-url") $ScriptUpdatesBaseUrl ];
|
||||||
:local UrlSuffix [ $EitherOr ($ScriptInfo->"url-suffix") $ScriptUpdatesUrlSuffix ];
|
:local UrlSuffix [ $EitherOr ($ScriptInfo->"url-suffix") $ScriptUpdatesUrlSuffix ];
|
||||||
|
@ -1182,10 +1187,9 @@
|
||||||
} else={
|
} else={
|
||||||
$LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!");
|
$LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!");
|
||||||
}
|
}
|
||||||
|
:error false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
:do {
|
|
||||||
:if ([ :len $SourceNew ] = 0) do={
|
:if ([ :len $SourceNew ] = 0) do={
|
||||||
$LogPrint debug $0 ("No update for script '" . $ScriptVal->"name" . "'.");
|
$LogPrint debug $0 ("No update for script '" . $ScriptVal->"name" . "'.");
|
||||||
:error false;
|
:error false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue