2001-06-24 06:34:49 +04:00
|
|
|
#!/bin/sh
|
2007-01-17 03:51:25 +03:00
|
|
|
# $NetBSD: mkman,v 1.5 2007/01/17 00:51:25 hubertf Exp $
|
2001-06-24 06:34:49 +04:00
|
|
|
|
|
|
|
#
|
2001-06-24 06:39:13 +04:00
|
|
|
# Find all manpage sources - run before tocrc
|
2001-06-24 06:34:49 +04:00
|
|
|
#
|
|
|
|
|
2002-05-23 04:03:38 +04:00
|
|
|
SRC=../../..
|
|
|
|
|
2001-06-24 06:34:49 +04:00
|
|
|
echo Preparing data ...
|
|
|
|
|
2002-05-23 04:03:38 +04:00
|
|
|
find ${SRC} -name '*.[1-9]' -print \
|
2001-06-24 06:34:49 +04:00
|
|
|
| xargs file \
|
|
|
|
| grep troff \
|
|
|
|
| sed 's/:[ ]*.*$//' \
|
|
|
|
| fgrep -v -f noman \
|
2001-06-30 05:00:47 +04:00
|
|
|
| grep -v '#' \
|
2007-01-17 03:51:25 +03:00
|
|
|
| grep -v '/obj\.' \
|
|
|
|
| grep -v '/destdir\.' \
|
|
|
|
| grep -v '/tooldir\.' \
|
2001-06-24 06:34:49 +04:00
|
|
|
>/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}
|
2001-06-24 06:34:49 +04:00
|
|
|
done
|
|
|
|
|
|
|
|
rm /tmp/mkman.$$
|