]> granicus.if.org Git - php/commitdiff
fix version checking - now handle 1.2.3 and 1.2 as well
authorBoian Bonev <bbonev@php.net>
Wed, 20 Mar 2002 19:22:54 +0000 (19:22 +0000)
committerBoian Bonev <bbonev@php.net>
Wed, 20 Mar 2002 19:22:54 +0000 (19:22 +0000)
ext/vpopmail/config.m4

index 9c8a94f97067127f3cc4fbbe58af2d091a0fad7f..65ff8a85d2a78c414a9ad841e24c057e5c9da0c7 100644 (file)
@@ -75,8 +75,8 @@ Use ./configure --with-vpopmail=<vpopmail-home-dir> if necessary)
        vpopmail_internal_api=1
        version=`grep VERSION $VPOPMAIL_INC_DIR/vpopmail_config.h`
        if test -n "$version"; then
-               version_major=`echo "$version" | sed 's/^[[^"]]\+"\([[0-9]]\+\)\.[[0-9]]\+"/\1/'`;
-               version_minor=`echo "$version" | sed 's/^[[^"]]\+"[[0-9]]\+\.\([[0-9]]\+\)"/\1/'`
+               version_major=`echo "$version" | tr "\"#." "   " | awk '{print $3}'`
+               version_minor=`echo "$version" | tr "\"#." "   " | awk '{print $4}'`
                if test $version_major -ge 5; then
                        if test $version_major -eq 5; then
                                if test $version_minor -ge 2; then