From f539e7cbd728368d50607299ecfc9da5fc4312be Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 29 Sep 2026 18:49:10 -0400 Subject: Apply Tadgy's patch to update the hardcoded file paths. --- bin/makepkgdb.pl | 14 +++++++------- bin/sbotools-update-db.sh | 13 +++++++------ bin/whatis2sqlite.pl | 6 +++--- 3 files changed, 17 insertions(+), 16 deletions(-) (limited to 'bin') diff --git a/bin/makepkgdb.pl b/bin/makepkgdb.pl index 3791787..83e441c 100755 --- a/bin/makepkgdb.pl +++ b/bin/makepkgdb.pl @@ -8,9 +8,9 @@ # the output is a huge pile of SQL insert statements, like half # a million of them. best way to run this IMO: -# $ makepkgdb.pl > db.sql -# $ rm -f /path/to/dbfile -# $ sqlite3 -bail /path/to/dbfile < db.sql +# $ makepkgdb.pl > ~/tmp/makepkgdb.sql +# $ rm -f ~/bot/SlackTools.sqlite3 +# $ sqlite3 -bail ~/bot/SlackTools.sqlite3 <~/tmp/makepkgdb.sql # this script was only tested for slackware 14.2. When 15.0 gets # released, we'll rebuild the database using this script, which @@ -22,8 +22,8 @@ ### configurables: @pkglists = ( - '/data/mirrors/slackware/slackware64-15.0/PACKAGES.TXT', - '/data/mirrors/slackware/slackware64-15.0/extra/PACKAGES.TXT', + '/data/depository/slackware/slackware64-15.0/PACKAGES.TXT', + '/data/depository/slackware/slackware64-15.0/extra/PACKAGES.TXT', ); # ...the above list could have included pasture and testing, but @@ -32,8 +32,8 @@ # these 2 are copies of /var/log/packages and /var/log/scripts from # a full install of 15.0, with no 3rd-party packages added: -$pkgdir = "/home/slackfacts/var.log/packages"; -$scriptsdir = "/home/slackfacts/var.log/scripts"; +$pkgdir = "/home/ibob/tmp/packages-15.0/"; +$scriptsdir = "/home/ibob/tmp/scripts-15.0/"; ### end configurables. diff --git a/bin/sbotools-update-db.sh b/bin/sbotools-update-db.sh index ec6a22f..90f4be3 100755 --- a/bin/sbotools-update-db.sh +++ b/bin/sbotools-update-db.sh @@ -2,16 +2,17 @@ # update the SBoTools.sqlite3 for the SBoTools limnoria plugin. # should be run from cron probably daily. also can be run manually. -# run this as the slackfacts user, not root. +# run this as the ibob user, not root. # configurables: -BOTDIR=/home/slackfacts/supybot +HOMEDIR=/home/ibob +BOTDIR=$HOMEDIR/bot DBFILE=$BOTDIR/SBoTools.sqlite3 -SCRIPT=$BOTDIR/limnoria.slackfacts.plugins/bin/sbodb.pl -SBOTREE=/data/mirrors/slackbuilds.org/15.0 +SCRIPT=$HOMEDIR/bot-plugins/limnoria.slackfacts.plugins/bin/sbodb.pl +SBOTREE=/data/depository/sbo/15.0 SQLITE3=/usr/bin/sqlite3 -LOG=$BOTDIR/sbotools-update-db.log -DATEFILE=$BOTDIR/sbotools-update-db.lastdate +LOG=$BOTDIR/logs/plugins/sbotools-update-db.log +DATEFILE=$BOTDIR/SBoTools.lastdate # 1st line of ChangeLog.txt is the date of the last SBo update. head -n 1 $SBOTREE/ChangeLog.txt > $DATEFILE.new diff --git a/bin/whatis2sqlite.pl b/bin/whatis2sqlite.pl index d5f1c6c..fbab358 100755 --- a/bin/whatis2sqlite.pl +++ b/bin/whatis2sqlite.pl @@ -5,8 +5,8 @@ # Usage: -# $ rm -f /path/to/Manpages.sqlite3 -# $ perl whatis2sqlite.pl [whatis-file] | sqlite /path/to/Manpages.sqlite3 +# $ rm -f ~/bot/Manpages.sqlite3 +# $ perl whatis2sqlite.pl ~/tmp/whatis-15.0 | sqlite ~/bot/Manpages.sqlite3 # then reload the Manpages plugin in the bot. @@ -16,7 +16,7 @@ # in "man whatis": # /etc/cron.daily/man-db -# whatis -w '*' | sort -u > whatis +# whatis -w '*' | sort -u > whatis-15.0 push @ARGV, 'whatis' unless @ARGV; -- cgit v1.2.3