aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-13 17:29:25 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-17 14:05:03 +0200
commit2ab3468700e35f4171bb541be571d3a0c58dd509 (patch)
tree30cfd06eb275c0d3a8a24d8a427de842a436aa0f
parent382f92856883ad66b483dd3fef9dfc95b69fbcac (diff)
global-functions: $ScriptInstallUpdate: restore indention
No functional change.
-rw-r--r--global-functions.rsc43
1 files changed, 21 insertions, 22 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index c6aee1f..4a8980a 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -888,30 +888,29 @@
}
}
- :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 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 \
- http-header-field=({ $FetchUserAgent }) $Url output=user as-value ];
- :if ($Result->"status" = "finished") do={
- :set SourceNew ($Result->"data");
- }
- } on-error={
- :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={
- $LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . \
- "', removing dummy. Typo on installation?") false;
- /system/script/remove $Script;
- } else={
- $LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!") false;
- }
+ :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 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 \
+ http-header-field=({ $FetchUserAgent }) $Url output=user as-value ];
+ :if ($Result->"status" = "finished") do={
+ :set SourceNew ($Result->"data");
+ }
+ } on-error={
+ :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={
+ $LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . \
+ "', removing dummy. Typo on installation?") false;
+ /system/script/remove $Script;
+ } else={
+ $LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!") false;
}
}
+ }
:if ([ :len $SourceNew ] > 0) do={
:if ($SourceNew != $ScriptVal->"source") do={