diff options
| author | perry <perry@NetBSD.org> | 1997-08-04 03:01:59 +0000 |
|---|---|---|
| committer | perry <perry@NetBSD.org> | 1997-08-04 03:01:59 +0000 |
| commit | 72c4d6ba1ccb3c3c54cbc1c7962836b3f35528da (patch) | |
| tree | 3e4cf75c8025ae1df7508b736fc1eb8614797276 /libexec | |
| parent | ba29cbc528cf65e74355682eb3e532d79cbfe1aa (diff) | |
now finds symlinked man pages, as submitted by Thorsten Frueauf in pr-3087
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/makewhatis/makewhatis.sh | 22 |
1 files changed, 18 insertions, 4 deletions
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 <jtc@netbsd.org>. +# +# Little addons to handle also linked and unformated man pages +# by Thorsten Frueauf <frueauf@ira.uka.de>. +# # 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$$ |
