31 lines
509 B
Bash
31 lines
509 B
Bash
#!/bin/sh
|
|
# $NetBSD: mkman,v 1.4 2002/05/23 00:03:38 hubertf Exp $
|
|
|
|
#
|
|
# Find all manpage sources - run before tocrc
|
|
#
|
|
|
|
SRC=../../..
|
|
|
|
echo Preparing data ...
|
|
|
|
find ${SRC} -name '*.[1-9]' -print \
|
|
| xargs file \
|
|
| grep troff \
|
|
| sed 's/:[ ]*.*$//' \
|
|
| fgrep -v -f noman \
|
|
| grep -v '#' \
|
|
>/tmp/mkman.$$
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9
|
|
do
|
|
echo Creating man$i
|
|
grep "${i}\$" </tmp/mkman.$$ \
|
|
| sed 's,\(.*/\)\([^/]*\),\2 \1\2,' \
|
|
| sort \
|
|
| sed 's/^.* //' \
|
|
>man${i}
|
|
done
|
|
|
|
rm /tmp/mkman.$$
|