aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-27 12:13:14 -0400
committerB. Watson <yalhcru@gmail.com>2022-03-27 12:13:14 -0400
commit4dba4347f3710b152c8778ff8926faffd1e0a41b (patch)
treed1bda15ea2dd4daca5b242b668572b63c3c22478
parentc8517ae0c6cc6456583f33e6d059b307d985c6e8 (diff)
downloadlimnoria.slackfacts.plugins-4dba4347f3710b152c8778ff8926faffd1e0a41b.tar.gz
whatis2sqlite.pl: update for Slackware 15.0
-rwxr-xr-xbin/whatis2sqlite.pl18
1 files 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";