NetBSD/share/man/man0/mkman

29 lines
497 B
Plaintext
Raw Normal View History

#!/bin/sh
2001-06-30 05:00:47 +04:00
# $NetBSD: mkman,v 1.3 2001/06/30 01:00:47 hubertf Exp $
#
2001-06-24 06:39:13 +04:00
# Find all manpage sources - run before tocrc
#
echo Preparing data ...
find ../../.. -name '*.[1-9]' -print \
| xargs file \
| grep troff \
| sed 's/:[ ]*.*$//' \
| fgrep -v -f noman \
2001-06-30 05:00:47 +04:00
| grep -v '#' \
>/tmp/mkman.$$
for i in 1 2 3 4 5 6 7 8 9
do
echo Creating man$i
2001-06-30 05:00:47 +04:00
grep "${i}\$" </tmp/mkman.$$ \
| sed 's,\(.*/\)\([^/]*\),\2 \1\2,' \
| sort \
| sed 's/^.* //' \
>man${i}
done
rm /tmp/mkman.$$