aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-09-27 20:31:16 -0500
committerRob Landley <rob@landley.net>2014-09-27 20:31:16 -0500
commit0b63d2671b2b11795c388943093d8b8269f665d6 (patch)
treeccf99da9bfa00e05f242e3f25d6bca1746dd1b8d /scripts
parent30de5eff5976ac9e6dc5e4c4f05aeee5adce5650 (diff)
downloadtoybox-0b63d2671b2b11795c388943093d8b8269f665d6.tar.gz
Allow single.sh to build more than one command per invocation.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/single.sh31
1 files changed, 17 insertions, 14 deletions
diff --git a/scripts/single.sh b/scripts/single.sh
index fef89e77..cb67d3bb 100755
--- a/scripts/single.sh
+++ b/scripts/single.sh
@@ -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