global-functions: $ScriptInstallUpdate: move code into block

This commit is contained in:
Christian Hesse 2025-03-05 00:28:01 +01:00
parent 469f783a92
commit 3ccaafd1b3

View file

@ -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;