From d54b2ef2d3da70d680e17b6a86dd421a94e59abc Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 27 Jul 2015 11:34:26 +0300 Subject: [PATCH] etc/optscan.sh - show undocumented options --- etc/optscan.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 etc/optscan.sh diff --git a/etc/optscan.sh b/etc/optscan.sh new file mode 100755 index 0000000..f18b77c --- /dev/null +++ b/etc/optscan.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +# Check if all options in main.c are defined in sample ini and docs + +sources="src/main.c" +targets="doc/config.txt etc/pgbouncer.ini" + +for opt in `grep CF_ABS "$sources" | sed -r 's/^[^"]*"([^"]*)".*/\1/'`; do + for conf in $targets; do + if ! grep -q "$opt" "$conf"; then + echo "$opt is missing in $conf" + fi + done +done + + -- 2.39.5