changeset 1395:ee222555de52

Print better error message for bad architecture name, idea from Alessio Igor Bogani.
author Rob Landley <rob@landley.net>
date Thu, 23 Jun 2011 07:41:05 -0500
parents 23f4333fec0c
children 6813331320ec
files build.sh
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Wed Jun 22 12:53:22 2011 -0500
+++ b/build.sh	Thu Jun 23 07:41:05 2011 -0500
@@ -29,16 +29,14 @@
 
 # Where "i686" is whichever target you want the new cross compiler to run on.
 
-# Start with some housekeeping stuff.  If this script was run with no
-# arguments, list available architectures out of sources/targets.
+# If this script was run with no arguments, list available architectures
 
-if [ $# -ne 1 ]
+if [ $# -ne 1 ] || [ ! -e sources/targets/"$1" ]
 then
   echo "Usage: $0 TARGET"
 
   echo "Supported architectures:"
-  cd sources/targets
-  ls
+  ls sources/targets
 
   exit 1
 fi