]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix version recognition.
authorBruno Haible <bruno@clisp.org>
Fri, 9 Jun 2006 20:23:12 +0000 (20:23 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:22 +0000 (12:13 +0200)
gettext-tools/tests/ChangeLog
gettext-tools/tests/lang-php

index f29f8fabf6ced6493e8d7d8ad233ace7997089cc..c3f5833e6b77f1ed113e07cee09ef198804c259f 100644 (file)
@@ -1,3 +1,7 @@
+2006-06-03  Bruno Haible  <bruno@clisp.org>
+
+       * lang-php: Fix version recognition for PHP 4.
+
 2006-06-03  Bruno Haible  <bruno@clisp.org>
 
        Explain why tests are skipped.
index 987274cf7c8e7940b0cdbf782df8095122bbf231..a42f944b78023d989e59f0e1f3e0fd8932c0e500 100755 (executable)
@@ -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.