changeset 4:77632d05568c

Add "all" target to build.sh
author Rob Landley <rob@landley.net>
date Wed, 06 Jul 2011 07:50:06 -0500
parents 4c679e447ffc
children 73ab228e8da3
files build.sh
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Wed Jul 06 07:49:49 2011 -0500
+++ b/build.sh	Wed Jul 06 07:50:06 2011 -0500
@@ -1,9 +1,18 @@
 #/bin/bash
 
-if [ -z "$1" ] || [ ! -x "images/$1/build.sh" ]
+if [ "$1" != "all" ] && [ ! -x "images/$1/build.sh" ]
 then
-  echo "Available images:"
+  echo 'Available images (or "all"):'
   ls images
+  exit 1
 fi
 
-images/"$1"/build.sh
+if [ "$1" != all ]
+then
+  images/"$1"/build.sh
+else
+  for i in $(ls images)
+  do
+    images/"$i"/build.sh || exit 1
+  done
+fi