mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-21 01:15:42 +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 {
|
||||
:local BaseUrl [ $EitherOr ($ScriptInfo->"base-url") $ScriptUpdatesBaseUrl ];
|
||||
:local UrlSuffix [ $EitherOr ($ScriptInfo->"url-suffix") $ScriptUpdatesUrlSuffix ];
|
||||
|
@ -1182,10 +1187,9 @@
|
|||
} else={
|
||||
$LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!");
|
||||
}
|
||||
:error false;
|
||||
}
|
||||
}
|
||||
|
||||
:do {
|
||||
:if ([ :len $SourceNew ] = 0) do={
|
||||
$LogPrint debug $0 ("No update for script '" . $ScriptVal->"name" . "'.");
|
||||
:error false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue