changeset 1504:c86e27992c4a

Allow single.sh to build more than one command per invocation.
author Rob Landley <rob@landley.net>
date Sat, 27 Sep 2014 20:31:16 -0500
parents 96bdf979d9e6
children 3fa0b2931082
files scripts/single.sh
diffstat 1 files changed, 17 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/single.sh	Sat Sep 27 20:28:33 2014 -0500
+++ b/scripts/single.sh	Sat Sep 27 20:31:16 2014 -0500
@@ -4,21 +4,24 @@
 
 if [ -z "$1" ]
 then
-  echo "usage: single.sh command" >&2
+  echo "usage: single.sh command..." >&2
   exit 1
 fi
 
-NAME=$(echo $1 | tr a-z- A-Z_)
-export KCONFIG_CONFIG=.singleconfig
-USET="is not set"
+for i in "$@"
+do
+  NAME=$(echo $i | tr a-z- A-Z_)
+  export KCONFIG_CONFIG=.singleconfig
+  USET="is not set"
 
-make allnoconfig > /dev/null &&
-sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 $USET/" \
-       -e "s/# \(CONFIG_$NAME\) $USET/\1=y/"  \
-       -e "s/# \(CONFIG_${NAME}_.*\) $USET/\1=y/" \
-       -e "s/# \(CONFIG_TOYBOX_HELP.*\) $USET/\1=y/" \
-       -e "s/# \(CONFIG_TOYBOX_I18N\) $USET/\1=y/" \
-       -e "s/# \(CONFIG_TOYBOX_FLOAT\) $USET/\1=y/" \
-       "$KCONFIG_CONFIG" &&
-make &&
-mv toybox $PREFIX$1
+  make allnoconfig > /dev/null &&
+  sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 $USET/" \
+         -e "s/# \(CONFIG_$NAME\) $USET/\1=y/"  \
+         -e "s/# \(CONFIG_${NAME}_.*\) $USET/\1=y/" \
+         -e "s/# \(CONFIG_TOYBOX_HELP.*\) $USET/\1=y/" \
+         -e "s/# \(CONFIG_TOYBOX_I18N\) $USET/\1=y/" \
+         -e "s/# \(CONFIG_TOYBOX_FLOAT\) $USET/\1=y/" \
+         "$KCONFIG_CONFIG" &&
+  make &&
+  mv toybox $PREFIX$i || break
+done