diff options
author | Rob Landley <rob@landley.net> | 2015-02-14 01:08:15 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-02-14 01:08:15 -0600 |
commit | 45962a70e01c817dea7e7bf872b4e33748df7921 (patch) | |
tree | 03bffde8f33322a38ee9d83f2abf47d928487bc1 /scripts/change.sh | |
parent | 67d9ea5a81c8083875ac7420d7e6a62766b48b6f (diff) | |
download | toybox-45962a70e01c817dea7e7bf872b4e33748df7921.tar.gz |
Move guts of "make change" to scripts/change.sh, don't try to build sh or help standalone.
sh builtin commands need multiplexer, help describes other enabled commands.
Diffstat (limited to 'scripts/change.sh')
-rwxr-xr-x | scripts/change.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/change.sh b/scripts/change.sh new file mode 100755 index 00000000..8b8ab92b --- /dev/null +++ b/scripts/change.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# build each command as a standalone executable + +NOBUILD=1 scripts/make.sh > /dev/null && +${HOSTCC:-cc} -I . scripts/install.c -o generated/instlist && +export PREFIX=${PREFIX:-change/} && +mkdir -p "$PREFIX" || exit 1 + +# Build all the commands standalone except: + +# sh - shell builtins like "cd" and "exit" need the multiplexer +# help - needs to know what other commands are enabled (use command --help) + +for i in $(generated/instlist | egrep -vw "sh|help") +do + echo -n "$i " && + scripts/single.sh $i > /dev/null || touch $PREFIX/${i}.bad +done |