From d04dc1feb92a279e27e4487c502944f454d43837 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 30 Aug 2013 01:53:31 -0500 Subject: Add scripts/single.sh to build individual non-multiplexed standalone commands. Alas, you can't quite do this yet: make defconfig make for i in $(./toybox) do echo $i PREFIX=singles/ scripts/single.sh $i || break done Because the OLDTOY() aliases for commands won't build without the base command. And I can't just skip them because chown/chmod or mv/cp aren't the same thing. --- scripts/single.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/single.sh (limited to 'scripts/single.sh') diff --git a/scripts/single.sh b/scripts/single.sh new file mode 100755 index 00000000..5303d9ac --- /dev/null +++ b/scripts/single.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Build a standalone toybox command + +if [ -z "$1" ] +then + echo "usage: single.sh command" >&2 + exit 1 +fi + +NAME=$(echo $1 | tr a-z- A-Z_) +export KCONFIG_CONFIG=.singleconfig + +make allnoconfig > /dev/null && +sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 is not set/" \ + -e "s/# CONFIG_\($NAME\|TOYBOX_HELP[^ ]*\) is not set/CONFIG_\1=y/" \ + "$KCONFIG_CONFIG" && +make && +mv toybox $PREFIX$1 -- cgit v1.2.3