[PATCH modular 3/3] Better cmdline error parsing.

Trevor Woerner twoerner at gmail.com
Mon Oct 4 10:57:01 PDT 2010


From: Trevor Woerner <twoerner at gmail.com>

If something appears to be wrong when parsing the command-line arguments
provide better feedback to the user.

Signed-off-by: Trevor Woerner <twoerner at gmail.com>
---
 build.sh |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index 585ff9c..d9a2ae7 100755
--- a/build.sh
+++ b/build.sh
@@ -1025,8 +1025,8 @@ do
     *)
 	if [ X"$PREFIX" != X ]; then
 	    echo "unrecognized and/or too many command-line arguments"
-	    echo "  new PREFIX:      $1"
-	    echo "  existing PREFIX: $PREFIX"
+	    echo "  new 'prefix':      $1"
+	    echo "  existing 'prefix': $PREFIX"
 	    echo ""
 	    usage
 	    exit 1
@@ -1049,6 +1049,8 @@ do
 done
 
 if [ X"${PREFIX}" = X ] && [ X"$LISTONLY" = X ]; then
+    echo "required argument 'prefix' appears to be missing"
+    echo ""
     usage
     exit 1
 fi
-- 
1.7.3.1.50.g1e633



More information about the xorg-devel mailing list