# Copyright (c) 1980 Regents of the University of California.
# All rights reserved. The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
# @(#)makewhatis.sh 5.3 (Berkeley) 3/29/86
trap "rm -f /tmp/whatisx.$$ /tmp/whatis$$; exit 1" 1 2 13 15
rm -f /tmp
/whatisx.$$
/tmp
/whatis$$
if test ! -d $MANDIR ; then exit 0 ; fi
for i
in man1 man2 man3 man4 man5 man6 man7 man8 mann manl
if test "`echo *.*`" != "*.*" ; then
sed </tmp
/whatisx.$$
>/tmp
/whatis$$ \
-e 's/\\f[PRIB0123]//g' \
-e 's/.TH [^ ]* \([^ ]*\).* \([^-]*\)/\2(\1) /' \
/usr
/ucb
/expand -24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100 \
/tmp
/whatis$$ |
sort |
/usr
/ucb
/unexpand -a > whatis
chmod 664 whatis >/dev
/null
2>&1
rm -f /tmp
/whatisx.$$
/tmp
/whatis$$