Merge pull request #15 from tkozybski/patch-1

rc version support
This commit is contained in:
beeyev 2021-09-27 10:31:31 +03:00 committed by GitHub
commit 2392ac3fda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,6 +89,11 @@ if ([:len [/system identity get name]] = 0 or [/system identity get name] = "Mik
:if ($isBetaPos > 1) do={
:set osVer ([:pick $osVer 0 $isBetaPos] . "." . [:pick $osVer ($isBetaPos + 4) [:len $osVer]]);
}
# Replace word `rc` with dot
:local isRcPos [:tonum [:find $osVer "rc" 0]];
:if ($isRcPos > 1) do={
:set osVer ([:pick $osVer 0 $isRcPos] . "." . [:pick $osVer ($isRcPos + 2) [:len $osVer]]);
}
:local dotPos1 [:find $osVer "." 0];
@ -392,4 +397,4 @@ if ($isOsNeedsToBeUpdated = true) do={
/system package update install;
}
:log info "$SMP script \"Mikrotik RouterOS automatic backup & update\" completed it's job.\r\n";
:log info "$SMP script \"Mikrotik RouterOS automatic backup & update\" completed it's job.\r\n";