mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
capsman-download-packages: create package path
This commit is contained in:
parent
289fd215c4
commit
2cd8a56aa7
1 changed files with 8 additions and 0 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue