fi
if [ $# -eq 0 ]; then
- echo "usage: $0 -h manual_source_file ..."
+ echo "usage: $0 [-h] manual_source_file ..."
exit 1
fi
EQN="eqn -Tascii"
ROFF="groff -ww -Tascii -P -c"
fi
-MOPT="-Werror $MOPT"
+MOPT="-Werror -Tascii $MOPT"
while [ -n "$1" ]; do
file=$1
shift
echo " ========== $file ========== "
tbl $file | $EQN | $ROFF -mandoc 2> /tmp/roff.err > /tmp/roff.out
- mandoc -Ios='OpenBSD ports' $MOPT $file 2> /tmp/mandoc.err > /tmp/mandoc.out
+ ${MANDOC:=mandoc} -Ios='OpenBSD ports' $MOPT $file \
+ 2> /tmp/mandoc.err > /tmp/mandoc.out
for i in roff mandoc; do
[[ -s /tmp/$i.err ]] && echo "$i errors:" && cat /tmp/$i.err
done