diff options
author | wosch <wosch@FreeBSD.org> | 1997-07-04 22:32:59 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1997-07-04 22:32:59 +0000 |
commit | eaa9fd68f5364f6b52437a9d557c5bc7cb5f8cc7 (patch) | |
tree | eb2016dbc1d1894cc73e85d856eebfed60058161 /gnu | |
parent | d4280e0ef8cbd23f489bfc51f752045ef774a77f (diff) | |
download | FreeBSD-src-eaa9fd68f5364f6b52437a9d557c5bc7cb5f8cc7.zip FreeBSD-src-eaa9fd68f5364f6b52437a9d557c5bc7cb5f8cc7.tar.gz |
Better section guessing for manual pages without suffix. The
plan9 manual pages dont have a suffix.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/man/makewhatis/makewhatis.perl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.perl b/gnu/usr.bin/man/makewhatis/makewhatis.perl index 453787e..b3ceeaa 100644 --- a/gnu/usr.bin/man/makewhatis/makewhatis.perl +++ b/gnu/usr.bin/man/makewhatis/makewhatis.perl @@ -26,7 +26,7 @@ # # makewhatis -- update the whatis database in the man directories. # -# $Id: makewhatis.perl,v 1.11 1996/08/27 20:04:09 wosch Exp $ +# $Id: makewhatis.perl,v 1.16 1997/03/14 21:58:43 wosch Exp $ sub usage { @@ -172,7 +172,7 @@ sub parse_dir { delete $man_red{$file}; } - if ($dir =~ /man$/) { + if ($dir =~ /man/) { warn "\n" if $verbose && $pointflag; warn "open manpath directory ``$dir''\n" if $verbose; $pointflag = 0; @@ -218,10 +218,10 @@ sub ext { $extension =~ s/$ext$//g; # strip .gz $extension =~ s/.*\///g; # basename - if ($extension !~ /\./) { # no dot + if ($extension !~ m%[^/]+\.[^.]+$%) { # no dot $extension = $filename; #$extension =~ s|/[^/]+$||; - $extension =~ s/.*(.)/$1/; # last character + $extension =~ s%.*man([^/]+)/[^/]+%$1%; # last character warn "\n" if $verbose && $pointflag; warn "$filename has no extension, try section ``$extension''\n" if $verbose; |