From: Bruno Haible Date: Fri, 9 Jun 2006 20:23:12 +0000 (+0000) Subject: Fix version recognition. X-Git-Tag: v0.15~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8ecdf93c75e0cd190c9db00de3bd67801c8f4cf;p=thirdparty%2Fgettext.git Fix version recognition. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index f29f8fabf..c3f5833e6 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,7 @@ +2006-06-03 Bruno Haible + + * lang-php: Fix version recognition for PHP 4. + 2006-06-03 Bruno Haible Explain why tests are skipped. diff --git a/gettext-tools/tests/lang-php b/gettext-tools/tests/lang-php index 987274cf7..a42f944b7 100755 --- a/gettext-tools/tests/lang-php +++ b/gettext-tools/tests/lang-php @@ -66,9 +66,12 @@ test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES ${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of php version 4.0 or newer. -case `(php -v) 2>/dev/null` in +(php -v) >/dev/null 2>/dev/null +test $? -le 1 \ + || { echo "Skipping test: php not found"; rm -fr $tmpfiles; exit 77; } +case `php -v | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in [4-9].*) ;; - *) echo "Skipping test: php not found or too old"; rm -fr $tmpfiles; exit 77;; + *) echo "Skipping test: php version too old"; rm -fr $tmpfiles; exit 77;; esac # Test which of the fr_FR locales are installed.