diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-01-03 13:58:15 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-01-03 13:58:15 +0100 |
commit | 4aca87515a5083ae0e31ce3177189fd43b6d05ac (patch) | |
tree | 7b1d9a31393ca090757dc6f0d3859b4fcd93f271 /release/src/router/busybox/scripts/checkhelp.awk | |
parent | 008d0be72b2f160382c6e880765e96b64a050c65 (diff) | |
download | tomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.gz tomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.bz2 |
patch to Vanilla Tomato 1.28
Diffstat (limited to 'release/src/router/busybox/scripts/checkhelp.awk')
-rwxr-xr-x | release/src/router/busybox/scripts/checkhelp.awk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/release/src/router/busybox/scripts/checkhelp.awk b/release/src/router/busybox/scripts/checkhelp.awk new file mode 100755 index 00000000..2468db2d --- /dev/null +++ b/release/src/router/busybox/scripts/checkhelp.awk @@ -0,0 +1,40 @@ +#!/usr/bin/awk -f +# AWK script to check for missing help entries for config options +# +# Copyright (C) 2006 Bernhard Reutner-Fischer +# +# This file is distributed under the terms and conditions of the +# MIT/X public licenses. See http://opensource.org/licenses/mit-license.html +# and notice http://www.gnu.org/licenses/license-list.html#X11License + + +/^choice/ { is_choice = 1; } +/^endchoice/ { is_choice = 0; } +/^config/ { + pos++; + conf[pos] = $2; + file[pos] = FILENAME; + if (is_choice) { + help[pos] = 1; # do not warn about 'choice' config entries. + } else { + help[pos] = 0; + } +} +/^[ \t]*help[ \t]*$/ { + help[pos] = 1; +} +/^[ \t]*bool[ \t]*$/ { + help[pos] = 1; # ignore options which are not selectable +} +BEGIN { + pos = -1; + is_choice = 0; +} +END { + for (i = 0; i <= pos; i++) { +# printf("%s: help for #%i '%s' == %i\n", file[i], i, conf[i], help[i]); + if (help[i] == 0) { + printf("%s: No helptext for '%s'\n", file[i], conf[i]); + } + } +} |