diff options
author | Christian Hesse <mail@eworm.de> | 2022-01-17 20:50:52 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-01-17 20:58:03 +0100 |
commit | 5363df356875325420a62273f00df1ea404d2aa4 (patch) | |
tree | 07c1fb6ebe9a6779b0d697423107c9ba5f34d7b0 /global-functions | |
parent | 25338ca384ddd41c4b9d3ad2a937228562043235 (diff) |
global-functions: $DownloadPackage: handle special case with name
For RouterOS 6.x bundled package version and architecture are swapped.
Closes: #21
(cherry picked from commit 1e6931c8e34d5035cb07baa98b57eccbcd4278ab)
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/global-functions b/global-functions index 40cd271..c6d311f 100644 --- a/global-functions +++ b/global-functions @@ -252,6 +252,7 @@ :global CleanFilePath; :global LogPrintExit2; :global MkDir; + :global VersionToNum; :global WaitForFile; :if ([ :len $PkgName ] = 0) do={ :return false; } @@ -259,6 +260,9 @@ :if ([ :len $PkgArch ] = 0) do={ :set PkgArch [ / system resource get architecture-name ]; } :local PkgFile ($PkgName . "-" . $PkgVer . "-" . $PkgArch . ".npk"); + :if ([ $VersionToNum $PkgVer ] < [ $VersionToNum "7.0" ] && $PkgName = "routeros") do={ + :set PkgFile ($PkgName . "-" . $PkgArch . "-" . $PkgVer . ".npk"); + } :if ($PkgArch = "x86_64" || $PkgName ~ "^routeros-") do={ :set PkgFile ($PkgName . "-" . $PkgVer . ".npk"); } |