aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-07-24 10:13:39 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-07-24 10:13:39 +0200
commit3aa4d7ea50dba77605fc1b4f928eaa498bbec3dc (patch)
treeaa7c2b6cd30c5df8be1921760c0527be2fc984b0
parent229dc539cc70fd156d8d69af370ae67d4bdb18a0 (diff)
packages-update: get values into array
-rw-r--r--packages-update9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages-update b/packages-update
index 44bd7cb..738ba2a 100644
--- a/packages-update
+++ b/packages-update
@@ -6,17 +6,16 @@
:global DownloadPackage;
-:local InstalledVersion [ / system package update get installed-version ];
-:local LatestVersion [ / system package update get latest-version ];
+:local Update [ / system package update get ];
-:if ($InstalledVersion = $LatestVersion) do={
- :log info ("Version " . $LatestVersion . " is already installed.");
+:if ($Update->"installed-version" = $Update->"latest-version") do={
+ :log info ("Version " . $Update->"latest-version" . " is already installed.");
:error "No updates available.";
}
:foreach Package in=[ / system package find where !bundle ] do={
:local PkgName [ / system package get $Package name ];
- if ([ $DownloadPackage $PkgName $LatestVersion ] = false) do={
+ if ([ $DownloadPackage $PkgName ($Update->"latest-version") ] = false) do={
:log error ("Download for package " . $PkgName . " failed.");
:error "Error: See log for details.";
}