summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-10-30 16:52:08 +0100
committerThomas Haller <thaller@redhat.com>2020-10-30 16:52:55 +0100
commit85a60f9d538016ac7ad76c7bdebb68a6a3f39de5 (patch)
treeac5cf35f0e03863f0d96acde62704d37a26ca69f /tools
parent2898daa5185b81de3e93970c31bb9ee468c8645e (diff)
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.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-config-options.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/check-config-options.sh b/tools/check-config-options.sh
index 7a775955bb..d9d4431ee8 100755
--- a/tools/check-config-options.sh
+++ b/tools/check-config-options.sh
@@ -18,8 +18,8 @@ get_missing_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/" -name \*.c ! -name test\*.c) |
+ sed -n 's/.*\<NM_CON_DEFAULT\(_NOP\)\?\s*("\([^"]*\)").*/\2/p'
}
get_man_con_defaults()