use numerical comparisions for version check
authorSteve Baker <steve@stevebaker.org>
Wed, 6 Feb 2002 12:53:15 +0000 (12:53 +0000)
committerSteve Baker <steve@stevebaker.org>
Wed, 6 Feb 2002 12:53:15 +0000 (12:53 +0000)
Original commit message from CVS:
use numerical comparisions for version check

autogen.sh

index 8de4a20..f2dcc60 100755 (executable)
@@ -85,14 +85,14 @@ version_check ()
   #start checking the version
   debug "version check"
 
-  if [ ! "$pkg_major" \> "$MAJOR" ]; then
-    debug "$pkg_major <= $MAJOR"
-    if [ "$pkg_major" \< "$MAJOR" ]; then
+  if [ ! "$pkg_major" -gt "$MAJOR" ]; then
+    debug "$pkg_major -le $MAJOR"
+    if [ "$pkg_major" -lt "$MAJOR" ]; then
       WRONG=1
-    elif [ ! "$pkg_minor" \> "$MINOR" ]; then
-      if [ "$pkg_minor" \< "$MINOR" ]; then
+    elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
+      if [ "$pkg_minor" -lt "$MINOR" ]; then
         WRONG=1
-      elif [ "$pkg_micro" \< "$MICRO" ]; then
+      elif [ "$pkg_micro" -lt "$MICRO" ]; then
        WRONG=1
       fi
     fi