No empty .Rs/.Re
[netbsd-mini2440.git] / share / man / man0 / mkman
blob90f56f9cdb55ca7817bbbf90ba7f98cf4315e156
1 #!/bin/sh
2 # $NetBSD: mkman,v 1.4 2002/05/23 00:03:38 hubertf Exp $
5 # Find all manpage sources - run before tocrc
8 SRC=../../..
10 echo Preparing data ...
12 find ${SRC} -name '*.[1-9]' -print \
13 | xargs file \
14 | grep troff \
15 | sed 's/:[ ]*.*$//' \
16 | fgrep -v -f noman \
17 | grep -v '#' \
18 | grep -v '/obj\.' \
19 | grep -v '/destdir\.' \
20 | grep -v '/tooldir\.' \
21 >/tmp/mkman.$$
23 for i in 1 2 3 4 5 6 7 8 9
25 echo Creating man$i
26 grep "${i}\$" </tmp/mkman.$$ \
27 | sed 's,\(.*/\)\([^/]*\),\2 \1\2,' \
28 | sort \
29 | sed 's/^.* //' \
30 >man${i}
31 done
33 rm /tmp/mkman.$$