No empty .Rs/.Re
[netbsd-mini2440.git] / share / man / tools / ckso
blob7f0f558c03883e6aa0c4b47897e75328249a9064
1 #! /bin/sh
3 # $NetBSD: ckso,v 1.2 1998/01/09 08:04:58 perry Exp $
5 set x $*
6 . ./.param
8 for dir in $DIRLST
9 do
10 > $TMPDIR/tmp.$$
11 date > $TMPDIR/badso$dir
12 echo >> $TMPDIR/badso$dir
13 date > $TMPDIR/needso$dir
14 echo >> $TMPDIR/needso$dir
15 cd $MANDIR/man$dir
16 for file in $FILLST
18 ln=`line < $file`
19 so=`echo $ln | sed "s/ .*//"`
20 if test "$so" = ".so"
21 then
22 so=`echo $ln | sed -e "s/.so//" -e "s/^/ls/"`
23 echo $so >> $TMPDIR/tmp.$$
24 else
25 ed - $file > $TMPDIR/tmp2.$$ <<!
26 /^\.SH NAME/+s/ .-.*//p
29 name=`line < $TMPDIR/tmp2.$$`
30 echo $name | grep "," > /dev/null
31 if test $? -eq 0
32 then
33 name=`echo $name | sed "s/,/ /g"`
34 for ent in $name
36 if test $ent = `echo $file | sed "s/\..*//"`
37 then
38 continue
40 ls $MANDIR/man$dir/$ent.* 2>&1 | grep "not found" >> $TMPDIR/needso$dir
41 done
44 done
46 cd $TMPDIR
47 sh tmp.$$ 2>&1 | grep "not found" >> badso$dir
48 rm -f tmp.$$ tmp2.$$
49 done