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:
slakmagik 2009-10-21 02:37:11 +00:00
parent 2ffee8a4a8
commit bb0f5047e7

View file

@ -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