NetBSD/share/man/tools/ckso

50 lines
963 B
Plaintext
Raw Normal View History

1992-07-13 20:18:25 +04:00
#! /bin/sh
1998-01-09 11:03:16 +03:00
#
# $NetBSD: ckso,v 1.2 1998/01/09 08:04:58 perry Exp $
#
1992-07-13 20:18:25 +04:00
set x $*
. ./.param
for dir in $DIRLST
do
> $TMPDIR/tmp.$$
date > $TMPDIR/badso$dir
echo >> $TMPDIR/badso$dir
date > $TMPDIR/needso$dir
echo >> $TMPDIR/needso$dir
cd $MANDIR/man$dir
for file in $FILLST
do
ln=`line < $file`
so=`echo $ln | sed "s/ .*//"`
if test "$so" = ".so"
then
so=`echo $ln | sed -e "s/.so//" -e "s/^/ls/"`
echo $so >> $TMPDIR/tmp.$$
else
ed - $file > $TMPDIR/tmp2.$$ <<!
/^\.SH NAME/+s/ .-.*//p
q
!
name=`line < $TMPDIR/tmp2.$$`
echo $name | grep "," > /dev/null
if test $? -eq 0
then
name=`echo $name | sed "s/,/ /g"`
for ent in $name
do
if test $ent = `echo $file | sed "s/\..*//"`
then
continue
fi
ls $MANDIR/man$dir/$ent.* 2>&1 | grep "not found" >> $TMPDIR/needso$dir
done
fi
fi
done
cd $TMPDIR
sh tmp.$$ 2>&1 | grep "not found" >> badso$dir
rm -f tmp.$$ tmp2.$$
done