aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/change.sh19
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