aboutsummaryrefslogtreecommitdiffstats
path: root/capsman-download-packages
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-08-26 09:23:56 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-08-26 09:29:52 +0200
commitff5cdc30193ba69944f6772f213e63ea00678861 (patch)
treed73fac7cd08f5463c8a432dd5153695ae0cf2cf1 /capsman-download-packages
parent92ca31a41df332171d1f2dcf08c75db570b12234 (diff)
[ ... print count-only ...] -> [ :len [ ... find ... ] ]
Using 'print count-only' always prints a number to terminal, even if the value is evaluated in a condition or assigned to a variable. This can be quite annoying. Behavior will not chance (SUP-25503), so replacing the code...
Diffstat (limited to 'capsman-download-packages')
-rw-r--r--capsman-download-packages4
1 files changed, 2 insertions, 2 deletions
diff --git a/capsman-download-packages b/capsman-download-packages
index 88aac0e..a314163 100644
--- a/capsman-download-packages
+++ b/capsman-download-packages
@@ -21,7 +21,7 @@ $WaitFullyConnected;
:local InstalledVersion [ / system package update get installed-version ];
:local Updated false;
-:if ([ / file print count-only where name=$PackagePath type="directory" ] = 0) do={
+:if ([ :len [ / file find where name=$PackagePath type="directory" ] ] = 0) do={
$MkDir $PackagePath;
$LogPrintExit info ("Created directory at package path (" . $PackagePath . \
"). Please place your packages!") false;
@@ -43,7 +43,7 @@ $WaitFullyConnected;
}
:if ($Updated = true) do={
- :if ([ / system script print count-only where name="capsman-rolling-upgrade" ] > 0) do={
+ :if ([ :len [ / system script find where name="capsman-rolling-upgrade" ] ] > 0) do={
/ system script run capsman-rolling-upgrade;
} else={
/ caps-man remote-cap upgrade [ find where version!=$InstalledVersion ];