From e94ffe37e7d3a7dbccc0e785725f26334a31e171 Mon Sep 17 00:00:00 2001 From: Boian Bonev Date: Wed, 20 Mar 2002 19:22:54 +0000 Subject: [PATCH] fix version checking - now handle 1.2.3 and 1.2 as well --- ext/vpopmail/config.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/vpopmail/config.m4 b/ext/vpopmail/config.m4 index 9c8a94f970..65ff8a85d2 100644 --- a/ext/vpopmail/config.m4 +++ b/ext/vpopmail/config.m4 @@ -75,8 +75,8 @@ Use ./configure --with-vpopmail= 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 -- 2.50.1