diff options
Diffstat (limited to 'tools/check-config-options.sh')
| -rwxr-xr-x | tools/check-config-options.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/check-config-options.sh b/tools/check-config-options.sh index 7a775955..4cbd4855 100755 --- a/tools/check-config-options.sh +++ b/tools/check-config-options.sh @@ -5,21 +5,21 @@ ret=0 get_supported_options() { - awk '/START OPTION LIST/{flag=1;next}/END OPTION LIST/{flag=0}flag' "$srcdir/src/nm-config.c" | + awk '/START OPTION LIST/{flag=1;next}/END OPTION LIST/{flag=0}flag' "$srcdir/src/core/nm-config.c" | grep -o 'NM_CONFIG_KEYFILE_KEY_\w*' } get_missing_options() { - grep -v '/\* check-config-options skip \*/' "$srcdir/src/nm-config.h" | + grep -v '/\* check-config-options skip \*/' "$srcdir/src/core/nm-config.h" | grep -o 'NM_CONFIG_KEYFILE_KEY_\w*' | grep -v -Fx -f <(get_supported_options) } get_src_con_defaults() { - sed -ne 's/.*\<NM_CON_DEFAULT\s*("\([^"]*\)").*/\1/p' $(find "$srcdir/src/" -name \*.c ! -name test\*.c) - sed -ne 's/.*\<NM_CON_DEFAULT_NOP\s*("\([^"]*\)").*/\1/p' $(find "$srcdir/src/" -name \*.c ! -name test\*.c) + sed -n 's/\<NM_CON_DEFAULT/\n\0/gp' $(find "$srcdir/src/core/" -name \*.c ! -name test\*.c) | + sed -n 's/.*\<NM_CON_DEFAULT\(_NOP\)\?\s*("\([^"]*\)").*/\2/p' } get_man_con_defaults() |