3
0

applets.h.sh 622 B

1234567891011121314151617181920212223
  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. # CONFIG_applet names
  6. grep ^IF_ applets.h | grep -v ^IF_FEATURE_ | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \
  7. | sort | uniq \
  8. >applets_APP1
  9. # command line applet names
  10. grep ^IF_ applets.h | sed -e's/ //g' -e's/.*(\([a-z[][^,]*\),.*/\1/' \
  11. | grep -v '^bash$' \
  12. | grep -v '^sh$' \
  13. | tr a-z A-Z \
  14. | sed 's/^SYSCTL$/BB_SYSCTL/' \
  15. | sed 's/^\[\[$/TEST1/' \
  16. | sed 's/^\[$/TEST2/' \
  17. | sort | uniq \
  18. >applets_APP2
  19. diff -u applets_APP1 applets_APP2 >applets_APP.diff
  20. #rm applets_APP1 applets_APP2