mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-01 16:54:38 +02:00
global-functions: $ScriptInstallUpdate: use $EitherOr
This commit is contained in:
parent
2ab3468700
commit
286e3d9cf9
1 changed files with 2 additions and 4 deletions
|
@ -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 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue