Skip to content

Commit

Permalink
Protect against empty $gettext_ver
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Roskin committed Dec 2, 2003
1 parent 125456c commit d00c419
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test -z "$srcdir" && srcdir=.
# Some shells don't propagate "set -e" to subshells.
set -e

cd $srcdir
cd "$srcdir"

# The autoconf cache (version after 2.52) is not reliable yet.
rm -rf autom4te.cache vfs/samba/autom4te.cache
Expand All @@ -40,14 +40,19 @@ gettext_ver=`$GETTEXTIZE --version | \
s/\(......\).*/\1/; # leave only 6 leading digits
'`

if test $gettext_ver -lt 01038; then
if test -z "$gettext_ver"; then
echo "Cannot determine version of gettext" 2>&1
exit 1
fi

if test "$gettext_ver" -lt 01038; then
echo "Don't use gettext older than 0.10.38" 2>&1
exit 1
fi

rm -rf intl
if test $gettext_ver -ge 01100; then
if test $gettext_ver -lt 01105; then
if test "$gettext_ver" -ge 01100; then
if test "$gettext_ver" -lt 01105; then
echo "Upgrade gettext to at least 0.11.5 or downgrade to 0.10.40" 2>&1
exit 1
fi
Expand Down

0 comments on commit d00c419

Please sign in to comment.