From 286e3d9cf907984a6e9886eda40dc7958845b93d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 13 Oct 2023 17:35:30 +0200 Subject: global-functions: $ScriptInstallUpdate: use $EitherOr --- global-functions.rsc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'global-functions.rsc') 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 \ -- cgit v1.2.3-54-g00ecf