moved check for gnutar into general dependencies check
authorStefan Graupner <stefan.graupner@gmail.com>
Wed, 3 Nov 2010 20:08:37 +0000 (21:08 +0100)
committerStefan Graupner <stefan.graupner@gmail.com>
Wed, 3 Nov 2010 20:08:37 +0000 (21:08 +0100)
summon-arm-toolchain

index 97c2508a2bbda6c54e45907e4501f1f2bac1d253..e1f396eb1c526be099ac8ad228ef02455ec5d54c 100755 (executable)
@@ -104,35 +104,32 @@ case "$(uname)" in
        Darwin)
        echo "Found Darwin OS."
 
+       # darwin dependencies
+       DARWINDEPS="gnutar mpfr libmpc gmp"
+  DARWINDEPSCOUNT=4
+
   GCCFLAGS="${GCCFLAGS} \
             --with-gmp=${DARWIN_OPT_PATH} \
                  --with-mpfr=${DARWIN_OPT_PATH} \
                  --with-mpc=${DARWIN_OPT_PATH} \
                        -with-libiconv-prefix=${DARWIN_OPT_PATH}"
-  if ! which gnutar > /dev/null ; then
-               echo "ERROR: GNU tar not found! (try 'sudo port install gnutar')"
-               exit 1
-       else
-               echo "GNU tar found!"
-               TAR=gnutar
-       fi
-
-  echo "Attempting to automatically check if common depencies are installed on your system"
+
+  echo "Attempting to automatically check if common dependencies are installed on your system"
   if ! which port > /dev/null; then
-    echo "MacPorts not installed, could not check for requirements automatically"
+    echo "MacPorts not installed."
   else
-    pc=`port installed mpfr libmpc gmp | wc -l | tr -d " "`
-    if [ ${pc} -lt 4 ];
+    pc=`port installed ${DARWINDEPS} | wc -l | tr -d " "`
+    if [ ${pc} -lt ${DARWINDEPSCOUNT} ];
     then
       echo "Something is missing, do you want to install everything needed?"
       echo "(You need super user rights to do this.)"
 
       if [ read = "y" || read = "yes" ];
       then
-        sudo port install mpfr libmpc gmp
+        sudo port install ${DARWINDEPS}
       fi
     else
-      echo "Found mpfr, libmpc and gmp. Proceeding..."
+      echo "Found: "${DARWINDEPS}"!"
     fi
   fi