diff options
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 |