fix version checking - now handle 1.2.3 and 1.2 as well

This commit is contained in:
Boian Bonev 2002-03-20 19:22:54 +00:00
parent f64628eb7d
commit e94ffe37e7

View 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