diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /man/Check | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'man/Check')
-rwxr-xr-x | man/Check | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/man/Check b/man/Check new file mode 100755 index 0000000..3842f1f --- /dev/null +++ b/man/Check @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Check various man pages for consistency issues related to +# possible changes in the code base +# + +tmp=/var/tmp/$$ +trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 + +# man pages that are not in the GNUmakefile will not be included +# in the build +for dir in man? +do + cd $dir + for file in * + do + [ "$file" = GNUmakefile ] && continue + if grep "[ ]$file" GNUmakefile >/dev/null + then + : + else + echo "$dir/$file: not in GNUmakefile" + fi + done + cd .. +done + +# completeness of PM_ERR codes in man3/pcpintro.3 +# +if [ -x ../src/pmerr/pmerr ] +then + ../src/pmerr/pmerr -l +else + echo >&2 "Warning: using installed pmerr not newly built one ..." + pmerr -l +fi \ +| sed \ + -e 's/^-[0-9]*[ ]*//' \ + -e 's/[ ].*//' \ + -e '/^$/d' \ +| sort >$tmp.codes + +awk <man3/pcpintro.3 ' +/^.TP/ { want = 1; next } +want == 1 && /^.B PM_ERR/ { print $2 } + { want = 0 }' \ +| sort >$tmp.desc + +comm -23 $tmp.codes $tmp.desc >$tmp.tmp +if [ -s $tmp.tmp ] +then + echo "Error codes defined but not documented in man3/pcpintro.3:" + sed -e 's/^/ /' $tmp.tmp +fi +comm -13 $tmp.codes $tmp.desc >$tmp.tmp +if [ -s $tmp.tmp ] +then + echo "Error codes documented in man3/pcpintro.3 but not defined:" + sed -e 's/^/ /' $tmp.tmp +fi + +# references to Irix are probably needing to be retired ... other +# than the previously checked exceptions +# +grep -r -i irix man? \ +| sed \ + -e '/man5\/pmns.5:.*IRIX:[A-Z]/d' \ + -e '/man1\/pcpintro.1:.*MacOSX, IRIX, AIX/d' \ + -e '/man1\/pmie.1:.*\/SGI_Admin\/books\/PCP_IRIX\//d' \ + -e '/man5\/pmns.5:#define IRIX 1/d' + |