mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-29 20:34:34 +01:00
small tweak to coerce bash into accepting any octal-looking numbers we might
get in updates_compare_versions() as decimal - thanks to artourter for the report (issue 31)
This commit is contained in:
parent
2ffee8a4a8
commit
bb0f5047e7
1 changed files with 2 additions and 2 deletions
|
@ -874,10 +874,10 @@ updates_compare_versions() {
|
|||
for ((i=1; i<=$COUNT; i++)); do
|
||||
eval LEFT=\$$i
|
||||
eval RIGHT=\${$(($i + $COUNT))}
|
||||
if [[ $LEFT -lt $RIGHT ]]; then
|
||||
if [[ 10#$LEFT -lt 10#$RIGHT ]]; then
|
||||
RESULT=1
|
||||
break
|
||||
elif [[ $LEFT -gt $RIGHT ]]; then
|
||||
elif [[ 10#$LEFT -gt 10#$RIGHT ]]; then
|
||||
RESULT=-1
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue