aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-06 11:51:33 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-06 12:46:46 +0200
commit2cd8a56aa7d33714ff24c3b473931d560e67235f (patch)
tree8a73359543c0ffa80deef5bcba4a94b264b1c2d2
parent289fd215c485b714561afdd720772fdd8080a128 (diff)
capsman-download-packages: create package path
-rw-r--r--capsman-download-packages8
1 files changed, 8 insertions, 0 deletions
diff --git a/capsman-download-packages b/capsman-download-packages
index de2feb9..c17a09d 100644
--- a/capsman-download-packages
+++ b/capsman-download-packages
@@ -8,6 +8,8 @@
:global CleanFilePath;
:global DownloadPackage;
+:global LogPrintExit;
+:global MkDir;
:global ScriptLock;
$ScriptLock "capsman-download-packages";
@@ -16,6 +18,12 @@ $ScriptLock "capsman-download-packages";
:local InstalledVersion [ / system package update get installed-version ];
:local Updated false;
+:if ([ / file print count-only where name=$PackagePath type="directory" ] = 0) do={
+ $MkDir $PackagePath;
+ $LogPrintExit info ("Created directory at package path (" . $PackagePath . \
+ "). Please place your packages!") false;
+}
+
:foreach Package in=[ / file find where type=package \
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
:local File [ / file get $Package ];