diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-17 15:34:16 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-17 15:34:16 +0100 |
commit | f4d0f4e7a9715375bfa4bcfb7ce26a967c78ca9e (patch) | |
tree | e42dfff8ad5a320f45adec4b8b646156c04c2719 | |
parent | 10880cc20ff424c5443a8fc6b6afa5c59c5ef602 (diff) | |
download | busybox-w32-f4d0f4e7a9715375bfa4bcfb7ce26a967c78ca9e.tar.gz busybox-w32-f4d0f4e7a9715375bfa4bcfb7ce26a967c78ca9e.tar.bz2 busybox-w32-f4d0f4e7a9715375bfa4bcfb7ce26a967c78ca9e.zip |
applets.h.sh: a script to check applet names against config options
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | include/applets.h.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/applets.h.sh b/include/applets.h.sh new file mode 100755 index 000000000..6b8046c4b --- /dev/null +++ b/include/applets.h.sh | |||
@@ -0,0 +1,20 @@ | |||
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 | sed 's/BB_SYSCTL/SYSCTL/' \ | ||
9 | | sort | uniq \ | ||
10 | >applets_APP1 | ||
11 | |||
12 | # command line applet names | ||
13 | grep ^IF_ applets.h | sed -e's/ //g' -e's/.*(\([a-z[][^,]*\),.*/\1/' \ | ||
14 | | grep -v '^bash$' | grep -v '^sh$' \ | ||
15 | | tr a-z A-Z \ | ||
16 | | sort | uniq \ | ||
17 | >applets_APP2 | ||
18 | |||
19 | diff -u applets_APP1 applets_APP2 >applets_APP.diff | ||
20 | rm applets_APP1 applets_APP2 | ||