Incorporate the first manpage integrity check
This commit is contained in:
parent
db2ceff911
commit
0c974a0cc7
|
@ -2,6 +2,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
|
||||||
|
|
||||||
EXTRA_DIST = completion-template
|
EXTRA_DIST = completion-template
|
||||||
|
|
||||||
|
TESTS = test-manpage.sh
|
||||||
|
|
||||||
dist_noinst_DATA = $(wildcard $(srcdir)/*.xml)
|
dist_noinst_DATA = $(wildcard $(srcdir)/*.xml)
|
||||||
if ENABLE_DOC
|
if ENABLE_DOC
|
||||||
html_DATA = tools.html
|
html_DATA = tools.html
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
SOURCE_PATH=../../
|
||||||
|
|
||||||
|
# find all the manual pages in src/tools
|
||||||
|
TOOLS=`find "${SOURCE_PATH}/doc/tools" -name "*.1.xml" | sed -E -e "s|.*/([a-z0-9-]*).*|\1|"`
|
||||||
|
ALL=1
|
||||||
|
|
||||||
|
for T in $TOOLS; do
|
||||||
|
SWITCHES=`${SOURCE_PATH}/src/tools/${T} 2>&1 | awk '{if (match($0,"--[a-zA-Z0-9-]*",a) != 0) print a[0]} {if (match($0," -[a-zA-Z0-9]",a) != 0) print a[0]}'`
|
||||||
|
for S in $SWITCHES; do
|
||||||
|
grep -q -- "$S" ${SOURCE_PATH}/doc/tools/${T}.1.xml || { echo "${T}: missing switch $S"; ALL=0; };
|
||||||
|
done
|
||||||
|
done
|
||||||
|
if [ "$ALL" = 0 ]; then
|
||||||
|
echo "Not all the switches in help are documented in manual pages"
|
||||||
|
exit 1;
|
||||||
|
fi
|
Loading…
Reference in New Issue