view devel/are-options-documented @ 242:bc9d9cd9ee8e

made addr_isequal() and addr_isequal_parent() more flexible refactored various bits of this stuff. addr_isequal_alias() had become needless now and was removed. In fail_msg.c: postmaster is now matched caseless, like required by RFC.
author markus schnalke <meillo@marmaro.de>
date Mon, 25 Oct 2010 17:42:48 -0300
parents 7b70bf4f1f42
children 4905a1d9e6a7
line wrap: on
line source

#!/bin/sh
#
# checks if all recognized options are documented
# run from masqmail's repository root dir
#
# Note: this script is far from perfect, but its development time to
#       usage value ratio is quite good :-)

docs="/tmp/masqmail-opts-docs.$$"
code="/tmp/masqmail-opts-code.$$"

cat man/masqmail.*.5 | grep -o '^\\fB[^(\\]*\\f.' |
    egrep -v 'OBSOLETE|http://' | sed 's,^\\fB,,; s,[\\ =].*,,' |
    sort -u | grep -v '^val$' >"$docs"

cat src/conf.c | grep 'lval,.*"' |
    sed 's,[^"]*",,; s,"\, [0-9]*,",; s,".*,,' | sort -u >"$code"

diff -U 0 "$code" "$docs" | grep -v '^@@'

rm -f "$docs" "$code"