From 4dba4347f3710b152c8778ff8926faffd1e0a41b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 27 Mar 2022 12:13:14 -0400 Subject: whatis2sqlite.pl: update for Slackware 15.0 --- bin/whatis2sqlite.pl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bin/whatis2sqlite.pl b/bin/whatis2sqlite.pl index 297a82a..b557754 100755 --- a/bin/whatis2sqlite.pl +++ b/bin/whatis2sqlite.pl @@ -11,10 +11,12 @@ # then reload the Manpages plugin in the bot. # For Slackware 14.2, the whatis-file comes from /usr/man/whatis. + # For 15.0, we'll have to generate it according to the directions # in "man whatis": -# $ whatis -w '*' | sort > whatis -# Note that man-db's databases will have to already exist, for that to work. + +# /etc/cron.daily/man-db +# whatis -w '*' | sort -u > whatis push @ARGV, 'whatis' unless @ARGV; @@ -36,9 +38,9 @@ while(<>) { chomp; # 14.2's whatis has some garbage entries, skip them. - next if /^struct/; - next if /^and (put|with)/; - next if /bernd\.warken/; + #next if /^struct/; + #next if /^and (put|with)/; + #next if /bernd\.warken/; s/\s+$//g; ($name, $desc) = split /\s+-\s+/, $_, 2; @@ -55,9 +57,9 @@ while(<>) { $sect =~ s/^(.).*$/$1/; # no "3x", etc. # 14.2's whatis has some wrong sections, fix them. - $sect = '8' if $sect eq 'v'; # ebtables - $sect = '1' if $sect eq 'P'; # cdparanoia - $sect = '1' if $sect eq 'o'; # rclock, rxvt + #$sect = '8' if $sect eq 'v'; # ebtables + #$sect = '1' if $sect eq 'P'; # cdparanoia + #$sect = '1' if $sect eq 'o'; # rclock, rxvt #print "$sect, $name, '$alias' => $desc\n"; -- cgit v1.2.3