From 72c4d6ba1ccb3c3c54cbc1c7962836b3f35528da Mon Sep 17 00:00:00 2001 From: perry Date: Mon, 4 Aug 1997 03:01:59 +0000 Subject: now finds symlinked man pages, as submitted by Thorsten Frueauf in pr-3087 --- libexec/makewhatis/makewhatis.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'libexec') diff --git a/libexec/makewhatis/makewhatis.sh b/libexec/makewhatis/makewhatis.sh index c592f2ce86c..fb31522b436 100644 --- a/libexec/makewhatis/makewhatis.sh +++ b/libexec/makewhatis/makewhatis.sh @@ -1,6 +1,10 @@ #! /bin/sh # # Written by J.T. Conklin . +# +# Little addons to handle also linked and unformated man pages +# by Thorsten Frueauf . +# # Public domain. # @@ -12,19 +16,29 @@ if test ! -d "$MANDIR"; then exit 1 fi -find $MANDIR -type f -name '*.0' -print | while read file +find $MANDIR \( -type f -or -type l \) -name '*.0' -print | while read file do sed -n -f /usr/share/man/makewhatis.sed $file; done > /tmp/whatis$$ -find $MANDIR -type f -name '*.0.Z' -print | while read file +find $MANDIR \( -type f -or -type l \) -name '*.[1-9]' -print | while read file +do + nroff -man $file | sed -n -f /usr/share/man/makewhatis.sed; +done >> /tmp/whatis$$ + +find $MANDIR \( -type f -or -type l \) -name '*.[1-9]?' -print | while read file +do + nroff -man $file | sed -n -f /usr/share/man/makewhatis.sed; +done >> /tmp/whatis$$ + +find $MANDIR \( -type f -or -type l \) -name '*.0.Z' -print | while read file do zcat $file | sed -n -f /usr/share/man/makewhatis.sed; done >> /tmp/whatis$$ -find $MANDIR -type f -name '*.0.gz' -print | while read file +find $MANDIR \( -type f -or -type l \) -name '*.0.gz' -print | while read file do - gzip -dc $file | sed -n -f /usr/share/man/makewhatis.sed; + gzip -fdc $file | sed -n -f /usr/share/man/makewhatis.sed; done >> /tmp/whatis$$ sort -u -o /tmp/whatis$$ /tmp/whatis$$ -- cgit