1#!/bin/sh 2 3set -- "$srcdir/shell.mdoc" shell.man 4 5printf '1..%d\n' "$#" 6 7n=0 8for script do 9 n=$(( n + 1 )) 10 11 case $script in 12 *.mdoc) doctype=doc ;; 13 *.man) doctype=an 14 esac 15 16 if mandoc -T lint -I os=Unix -m"$doctype" "$script"; then 17 printf 'ok %d\t- mandoc lint %s\n' "$n" "$script" 18 else 19 printf 'not ok %d\t- mandoc lint %s\n' "$n" "$script" 20 fi 21done 22