build: properly detect versions like "2.6.36+"

This commit is contained in:
Jan Engelhardt
2010-11-03 12:55:09 +01:00
parent 3ed1a3cbf0
commit 2ae0413e31

View File

@@ -57,12 +57,12 @@ kminor="${krel%%.*}";
krel="${krel#*.}";
kmicro="${krel%%.*}";
if test "$kmicro" = "$krel"; then
kmicro="$(($kmicro+0))"; # Get rid of non numbers ("2.6.36+" -> "2.6.36")
kstable=0;
else
kmicro="$(($kmicro+0))";
kstable="${krel#*.}";
if test -z "$kstable"; then
kstable=0;
fi;
kstable="$(($kstable+0))";
fi;
if test -z "$kmajor" -o -z "$kminor" -o -z "$kmicro"; then
echo "WARNING: Version detection did not succeed. Continue at own luck.";