abuild: fix gnu getopt detection (trivial)
[coreboot.git] / util / abuild / abuild
index 9c972eac500a688e2b4003b2413abd1b45d80efc..2d1382acca2fe2ca3015476c35902e11cad371aa 100755 (executable)
@@ -14,8 +14,8 @@
 
 #set -x # Turn echo on....
 
-ABUILD_DATE="May 3rd, 2008"
-ABUILD_VERSION="0.6"
+ABUILD_DATE="May 27th, 2008"
+ABUILD_VERSION="0.7"
 
 # Where shall we place all the build trees?
 TARGET=$( pwd )/coreboot-builds
@@ -495,12 +495,14 @@ LBROOT=$( cd ../..; pwd )
 verbose=false
 
 # parse parameters.. try to find out whether we're running GNU getopt
-if [ "`getopt -V`" == "getopt.*" ]; then
-       args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent Vvhat:bp:Tc:s -- "$@"`
+getoptbrand="`getopt -V`"
+if [ "${getoptbrand:0:6}" == "getopt" ]; then
+       # Detected GNU getopt that supports long options.
+       args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent,xml Vvhat:bp:Tc:sx -- "$@"`
        eval set "$args"
 else
        # Detected non-GNU getopt
-       args=`getopt Vvhat:bp:Tc:s $*`
+       args=`getopt Vvhat:bp:Tc:sx $*`
        set -- $args
 fi