[git commit] applets.h.sh: a script to check applet names against config options

Denys Vlasenko vda.linux at googlemail.com
Thu Nov 17 14:34:16 UTC 2016


commit: https://git.busybox.net/busybox/commit/?id=f4d0f4e7a9715375bfa4bcfb7ce26a967c78ca9e
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 include/applets.h.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/applets.h.sh b/include/applets.h.sh
new file mode 100755
index 0000000..6b8046c
--- /dev/null
+++ b/include/applets.h.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# This script allows to check whether every applet has a separate option
+# enabling it. Run it after applets.h is generated.
+
+# CONFIG_applet names
+grep ^IF_ applets.h | grep -v IF_FEATURE_ | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \
+| grep -v MODPROBE_SMALL | sed 's/BB_SYSCTL/SYSCTL/' \
+| sort | uniq \
+>applets_APP1
+
+# command line applet names
+grep ^IF_ applets.h | sed -e's/ //g' -e's/.*(\([a-z[][^,]*\),.*/\1/' \
+| grep -v '^bash$' | grep -v '^sh$' \
+| tr a-z A-Z \
+| sort | uniq \
+>applets_APP2
+
+diff -u applets_APP1 applets_APP2 >applets_APP.diff
+rm applets_APP1 applets_APP2


More information about the busybox-cvs mailing list