diff options
author | Rob Landley <rob@landley.net> | 2013-08-30 01:53:31 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-08-30 01:53:31 -0500 |
commit | d04dc1feb92a279e27e4487c502944f454d43837 (patch) | |
tree | e0bf10d7b9b3b7be24e3454d8014cd258bd6d24f /scripts/single.sh | |
parent | dd4bed0f1dff419b9dca9424f2945baab727c3dd (diff) | |
download | toybox-d04dc1feb92a279e27e4487c502944f454d43837.tar.gz |
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.
Diffstat (limited to 'scripts/single.sh')
-rwxr-xr-x | scripts/single.sh | 19 |
1 files changed, 19 insertions, 0 deletions
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 |