From: Marko Kreen Date: Mon, 27 Jul 2015 08:34:26 +0000 (+0300) Subject: etc/optscan.sh - show undocumented options X-Git-Tag: pgbouncer_1_6~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d54b2ef2d3da70d680e17b6a86dd421a94e59abc;p=pgbouncer etc/optscan.sh - show undocumented options --- 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 + +