changeset 114:304fd441e6a4

Re-teach build.sh to build more than one architecture in sequence.
author Rob Landley <rob@landley.net>
date Wed, 28 Feb 2007 19:36:22 -0500
parents 46e794241456
children f68334e045dd
files build.sh
diffstat 1 files changed, 18 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Wed Feb 28 19:35:47 2007 -0500
+++ b/build.sh	Wed Feb 28 19:36:22 2007 -0500
@@ -1,13 +1,23 @@
 #!/bin/bash
 
-# Just for argument checking 
+# If run with no arguments, list architectures.
 
-./include.sh $1 || exit 1
+if [ $# -eq 0 ]
+then
+  echo "Usage: $0 ARCH [ARCH...]"
+  ./include.sh
+fi
 
-# Run the steps in order
+# Download source code and build host tools.
 
-./download.sh &&
-./host-tools.sh &&
-./cross-compiler.sh $1 &&
-./mini-native.sh $1 &&
-./package-mini-native.sh $1
+./download.sh || exit 1
+./host-tools.sh || exit 1
+
+# Run the steps in order for each architecture listed on the command line
+for i in "$@"
+do
+  echo "=== Building ARCH $i"
+  ./cross-compiler.sh $i || exit 1
+  ./mini-native.sh $i || exit 1
+  ./package-mini-native.sh $i || exit 1
+done