changeset 1739:4ca4ddd185db

Check up front that "./build.sh $ARCH $STAGE" actually names an existing stage to rebuild from.
author Rob Landley <rob@landley.net>
date Fri, 20 Feb 2015 13:14:50 -0600
parents cdc277cf7b83
children 258427b0c8be
files build.sh
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Fri Feb 20 13:13:36 2015 -0600
+++ b/build.sh	Fri Feb 20 13:14:50 2015 -0600
@@ -25,7 +25,8 @@
 
 # If this script was run with no arguments, list available architectures
 
-[ ! -z "$2" ] && REBUILD="$2"
+[ ! -z "$2" ] && REBUILD="$2" &&
+  [ ! -e "$2".sh ] && echo "no stage $2" && exit 1
 
 if [ $# -lt 1 ] || [ $# -gt 2 ] || [ ! -e sources/targets/"$1" ]
 then