From: Trevor Woerner <[email protected]>

If the user specifies unknown, misspelled, or too many cmdline arguments
make sure to catch them and generate an error.

Signed-off-by: Trevor Woerner <[email protected]>
---

NOTE: this patch to be applied after the 10 I sent yesterday!

 build.sh |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/build.sh b/build.sh
index 6c63cc5..6c76a5c 100755
--- a/build.sh
+++ b/build.sh
@@ -897,6 +897,7 @@ HAVE_ARCH="`uname -i`"
 DIR_ARCH=""
 DIR_CONFIG="."
 LIB_ONLY=0
+PREFIX=""
 
 # Process command line args
 while [ $# != 0 ]
@@ -984,6 +985,14 @@ do
        fi
        ;;
     *)
+       if [ X"$PREFIX" != X ]; then
+           echo "unrecognized and/or too many command-line arguments"
+           echo "  new PREFIX:      $1"
+           echo "  existing PREFIX: $PREFIX"
+           echo ""
+           usage
+           exit 1
+       fi
        PREFIX=$1
        ;;
     esac
-- 
1.7.3.1.45.g9855b

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to