diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-07-11 23:54:21 +0300 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-07-12 00:49:57 +0300 |
commit | 97529a3713d899468fb3ca7a1c3f75a09bd1b215 (patch) | |
tree | 056bc449c5d704c96ebd95e0c99f06d08f93fd9f /autogen.sh | |
parent | dd6026b613aa5414a128727995f2a4f79284072a (diff) |
build: Avoid shifting shell parameters that aren't there.
The shift primitive of the Solaris 9 Bourne shell doesn't like
it if we try to shift more formal arguments than are there.
This causes the compare_versions function in autogen.sh to croak when
the actual and compared versions differ in the number of
components.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh index 3edbe8106..10c28325f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -72,7 +72,8 @@ compare_versions() { IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." set $ch_actual_version for ch_min in $ch_min_version; do - ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes + ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; # remove letter suffixes + if [ $# -gt 0 ]; then shift; fi if [ -z "$ch_min" ]; then break; fi if [ -z "$ch_cur" ]; then ch_status=1; break; fi if [ $ch_cur -gt $ch_min ]; then break; fi |