Denys Vlasenko | f4d0f4e | 2016-11-17 15:34:16 +0100 | [diff] [blame] | 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 |
Denys Vlasenko | a1cd0d9 | 2016-12-23 15:12:27 +0100 | [diff] [blame] | 7 | grep ^IF_ applets.h | grep -v ^IF_FEATURE_ | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \ |
Denys Vlasenko | f4d0f4e | 2016-11-17 15:34:16 +0100 | [diff] [blame] | 8 | | sort | uniq \ |
| 9 | >applets_APP1 |
| 10 | |
| 11 | # command line applet names |
| 12 | grep ^IF_ applets.h | sed -e's/ //g' -e's/.*(\([a-z[][^,]*\),.*/\1/' \ |
Denys Vlasenko | 15fb91c | 2016-11-23 18:31:48 +0100 | [diff] [blame] | 13 | | grep -v '^bash$' \ |
| 14 | | grep -v '^sh$' \ |
Denys Vlasenko | f4d0f4e | 2016-11-17 15:34:16 +0100 | [diff] [blame] | 15 | | tr a-z A-Z \ |
Denys Vlasenko | 326edc3 | 2016-12-22 14:36:49 +0100 | [diff] [blame] | 16 | | sed 's/^SYSCTL$/BB_SYSCTL/' \ |
| 17 | | sed 's/^\[\[$/TEST1/' \ |
| 18 | | sed 's/^\[$/TEST2/' \ |
Denys Vlasenko | f4d0f4e | 2016-11-17 15:34:16 +0100 | [diff] [blame] | 19 | | sort | uniq \ |
| 20 | >applets_APP2 |
| 21 | |
| 22 | diff -u applets_APP1 applets_APP2 >applets_APP.diff |
Denys Vlasenko | 326edc3 | 2016-12-22 14:36:49 +0100 | [diff] [blame] | 23 | #rm applets_APP1 applets_APP2 |