Rob Landley | d04dc1f | 2013-08-30 01:53:31 -0500 | [diff] [blame] | 1 | #!/bin/bash |
2 | |||||
3 | # Build a standalone toybox command | ||||
4 | |||||
5 | if [ -z "$1" ] | ||||
6 | then | ||||
7 | echo "usage: single.sh command" >&2 | ||||
8 | exit 1 | ||||
9 | fi | ||||
10 | |||||
11 | NAME=$(echo $1 | tr a-z- A-Z_) | ||||
12 | export KCONFIG_CONFIG=.singleconfig | ||||
13 | |||||
14 | make allnoconfig > /dev/null && | ||||
15 | sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 is not set/" \ | ||||
16 | -e "s/# CONFIG_\($NAME\|TOYBOX_HELP[^ ]*\) is not set/CONFIG_\1=y/" \ | ||||
17 | "$KCONFIG_CONFIG" && | ||||
18 | make && | ||||
19 | mv toybox $PREFIX$1 |