[htdig] Update digging


Geoff Hutchison (ghutchis@wso.williams.edu)
Wed, 3 Mar 1999 00:09:32 -0500 (EST)


It's not a work of art, but this is my rundig script. By default it runs
in update mode. If the databases don't exist, update mode acts like
initial digging. So when I want to do an initial dig, I "rm *.work" and
the next dig will be literally "from scratch."

I'll post this on the contrib/ section under something like rundig-grh.sh.
Before I do that, I'll clean it up a bit. :-)

(I seem to remember making some changes to the default rundig script in
3.1.0 that does similar stuff with the mv and cp. But I'd have to check.)

-Geoff

#! /bin/sh

#
# rundig
#
# This is a script to update the ht://Dig db files
# Copyright (c) 1995-1999 The ht://Dig Group
# Originally bsaed on the example rundig script with ht://Dig
# Revised by Geoff Hutchison <ghutchis@wso.williams.edu>
# to do update digging on alternate files in minimal space.
#
if [ "$1" = "-v" ]; then
    verbose="-vvv"
fi

BASEDIR=/opt/htdig
TEMP=$BASEDIR/rundig.out
CONF=$BASEDIR/conf/htdig.conf
TMPDIR=/var/tmp
export TMPDIR

echo Start time: `date`
$BASEDIR/bin/htdig $verbose -s -a -c $CONF >$TEMP
echo Done Digging: `date`
$BASEDIR/bin/htmerge $verbose -s -a -c $CONF >>$TEMP
echo Done Merging: `date`
#$BASEDIR/bin/htnotify $verbose -c $CONF >>$TEMP
#echo Done Notifying: `date`
#$BASEDIR/bin/htfuzzy $verbose soundex

# Move 'em into place. Since we only need db.wordlist to do update digs
# and we always use -a, we don't need to move it!
# mv $BASEDIR/db/db.wordlist.work $BASEDIR/db/db.wordlist
cp $BASEDIR/db/db.docdb.work $BASEDIR/db/db.docdb
# These are generated from htmerge, so we don't want copies of them.
mv $BASEDIR/db/db.docs.index.work $BASEDIR/db/db.docs.index
mv $BASEDIR/db/db.words.db.work $BASEDIR/db/db.words.db

echo End time: `date`
echo
fgrep "htdig:" $TEMP
echo
fgrep "htmerge:" $TEMP
echo
fgrep "htnotify:" $TEMP
echo
echo Total lines in $TEMP: `wc -l $TEMP`

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Thu Mar 04 1999 - 09:09:18 PST