test: make [ and [[ forms individually selectable
[oweals/busybox.git] / include / applets.h.sh
1 #!/bin/sh
2 #
3 # This script allows to check whether every applet has a separate option
4 # enabling it. Run it after applets.h is generated.
5
6 # CONFIG_applet names
7 grep ^IF_ applets.h | grep -v IF_FEATURE_ | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \
8 | grep -v MODPROBE_SMALL \
9 | sed 's/BB_SYSCTL/SYSCTL/' \
10 | sed 's/TEST1/[/' \
11 | sed 's/TEST2/[[/' \
12 | sort | uniq \
13 >applets_APP1
14
15 # command line applet names
16 grep ^IF_ applets.h | sed -e's/ //g' -e's/.*(\([a-z[][^,]*\),.*/\1/' \
17 | grep -v '^bash$' \
18 | grep -v '^sh$' \
19 | tr a-z A-Z \
20 | sort | uniq \
21 >applets_APP2
22
23 diff -u applets_APP1 applets_APP2 >applets_APP.diff
24 rm applets_APP1 applets_APP2