aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-09-13 10:29:06 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-09-13 10:29:06 +0200
commit734a80ba82cfb76c34484415a5e810a1d29bdbfe (patch)
tree6dc18017963c9d81c53e0ff93c1ad0bd2a714428
parent41b19b045ad98c528ce9d8d84ab086fe7c54f265 (diff)
backup-partition: use $VersionToNum to calculate bitmask
-rw-r--r--backup-partition.rsc3
1 files changed, 2 insertions, 1 deletions
diff --git a/backup-partition.rsc b/backup-partition.rsc
index 23dd7ef..51df454 100644
--- a/backup-partition.rsc
+++ b/backup-partition.rsc
@@ -81,8 +81,9 @@
:local Update [ /system/package/update/get ];
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
+ :local BitMask [ $VersionToNum "255.255zero0" ];
:if ($BackupPartitionCopyBeforeFeatureUpdate = true && $NumLatest > 0 && \
- ($NumInstalled & 0xffff0000) != ($NumLatest & 0xffff0000)) do={
+ ($NumInstalled & $BitMask) != ($NumLatest & $BitMask)) do={
:if ([ $CopyTo $ScriptName $FallbackTo $FallbackToName ] = false) do={
:set PackagesUpdateBackupFailure true;
:error false;