blob: 5303d9ac5dae9cb230ca33d7053bcc4cca632615 [file] [log] [blame]
Rob Landleyd04dc1f2013-08-30 01:53:31 -05001#!/bin/bash
2
3# Build a standalone toybox command
4
5if [ -z "$1" ]
6then
7 echo "usage: single.sh command" >&2
8 exit 1
9fi
10
11NAME=$(echo $1 | tr a-z- A-Z_)
12export KCONFIG_CONFIG=.singleconfig
13
14make allnoconfig > /dev/null &&
15sed -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" &&
18make &&
19mv toybox $PREFIX$1