tools: fix "check-config-options.sh" for detecting multiple NM_CON_DEFAULT() on one line

If there are multiple NM_CON_DEFAULT() mentionings on the same line,
previously the script would not parse them all. Adjust, by first wrapping
the line.
This commit is contained in:
Thomas Haller
2020-10-30 16:52:08 +01:00
parent 2898daa518
commit 85a60f9d53

View File

@@ -18,8 +18,8 @@ get_missing_options()
get_src_con_defaults() get_src_con_defaults()
{ {
sed -ne 's/.*\<NM_CON_DEFAULT\s*("\([^"]*\)").*/\1/p' $(find "$srcdir/src/" -name \*.c ! -name test\*.c) sed -n 's/\<NM_CON_DEFAULT/\n\0/gp' $(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\(_NOP\)\?\s*("\([^"]*\)").*/\2/p'
} }
get_man_con_defaults() get_man_con_defaults()