Code

fixing the rest of packaging bug missing files 1632894
[inkscape.git] / autogen.sh
index 2309d7795f91c9498773e776bc7915ad96be6269..b37c09b526d04fa5719848b6a08c0c1e437c8d6d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh 
+#!/bin/bash 
 
 # This script does all the magic calls to automake/autoconf and
 # friends that are needed to configure a cvs checkout.  As described in
@@ -28,7 +28,13 @@ cd "$srcdir"
 
 check_version ()
 {
-    if expr "$1" \>= "$2" > /dev/null; then
+MAJOR1=`echo "$1" | cut -d"." -f1`;
+MINOR1=`echo "$1" | cut -s -d"." -f2`;
+MAJOR2=`echo "$2" | cut -d"." -f1`;
+MINOR2=`echo "$2" | cut -d"." -f2;`
+test -z "$MINOR1" && MINOR1="0";
+
+if (("$MAJOR1" > "$MAJOR2"))||(((("$MAJOR1" == "$MAJOR2")) && (("$MINOR1" \>= "$MINOR2")))); then
         echo "yes (version $1)"
     else
         echo "Too old (found version $1)!"