blob: be117cf84abf3b867494010db1b0d2fed61b65aa [file] [log] [blame]
Denys Vlasenkof4d0f4e2016-11-17 15:34:16 +01001#!/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 Vlasenkoa1cd0d92016-12-23 15:12:27 +01007grep ^IF_ applets.h | grep -v ^IF_FEATURE_ | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \
Denys Vlasenkof4d0f4e2016-11-17 15:34:16 +01008| sort | uniq \
9>applets_APP1
10
11# command line applet names
12grep ^IF_ applets.h | sed -e's/ //g' -e's/.*(\([a-z[][^,]*\),.*/\1/' \
Denys Vlasenko15fb91c2016-11-23 18:31:48 +010013| grep -v '^bash$' \
14| grep -v '^sh$' \
Denys Vlasenkof4d0f4e2016-11-17 15:34:16 +010015| tr a-z A-Z \
Denys Vlasenko326edc32016-12-22 14:36:49 +010016| sed 's/^SYSCTL$/BB_SYSCTL/' \
17| sed 's/^\[\[$/TEST1/' \
18| sed 's/^\[$/TEST2/' \
Denys Vlasenkof4d0f4e2016-11-17 15:34:16 +010019| sort | uniq \
20>applets_APP2
21
22diff -u applets_APP1 applets_APP2 >applets_APP.diff
Denys Vlasenko326edc32016-12-22 14:36:49 +010023#rm applets_APP1 applets_APP2