diff options
-rw-r--r-- | capsman-download-packages | 8 |
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 ]; |