diff options
author | Christian Hesse <mail@eworm.de> | 2023-10-13 17:35:30 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-10-17 14:05:03 +0200 |
commit | 286e3d9cf907984a6e9886eda40dc7958845b93d (patch) | |
tree | 464bfd810fc674f95acd273bf918b9cda5e7bae3 /global-functions.rsc | |
parent | 2ab3468700e35f4171bb541be571d3a0c58dd509 (diff) |
global-functions: $ScriptInstallUpdate: use $EitherOr
Diffstat (limited to 'global-functions.rsc')
-rw-r--r-- | global-functions.rsc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/global-functions.rsc b/global-functions.rsc index 4a8980a..878e95e 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -890,10 +890,8 @@ :if (!($ScriptInfo->"ignore" = true)) do={ :do { - :local BaseUrl $ScriptUpdatesBaseUrl; - :local UrlSuffix $ScriptUpdatesUrlSuffix; - :if ([ :typeof ($ScriptInfo->"base-url") ] = "str") do={ :set BaseUrl ($ScriptInfo->"base-url"); } - :if ([ :typeof ($ScriptInfo->"url-suffix") ] = "str") do={ :set UrlSuffix ($ScriptInfo->"url-suffix"); } + :local BaseUrl [ $EitherOr ($ScriptInfo->"base-url") $ScriptUpdatesBaseUrl ]; + :local UrlSuffix [ $EitherOr ($ScriptInfo->"url-suffix") $ScriptUpdatesUrlSuffix ]; :local Url ($BaseUrl . $ScriptVal->"name" . ".rsc" . $UrlSuffix); $LogPrintExit2 debug $0 ("Fetching script '" . $ScriptVal->"name" . "' from url: " . $Url) false; :local Result [ /tool/fetch check-certificate=yes-without-crl \ |