summaryrefslogtreecommitdiff
path: root/localrundig
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-01-21 00:18:07 +0000
committerJonas Smedegaard <dr@jones.dk>2002-01-21 00:18:07 +0000
commit5148c4cc699884c13895992a889d397afc60c64f (patch)
treeab61cfabbbf9b97474b4464268110ffd7cfaad74 /localrundig
parent3ef4189d9badf84700e7450525c094be1ff18c43 (diff)
Add localrundig (copy of rundig from htdig 3.1.6-0.snapshot011118).
Diffstat (limited to 'localrundig')
-rwxr-xr-xlocalrundig75
1 files changed, 75 insertions, 0 deletions
diff --git a/localrundig b/localrundig
new file mode 100755
index 0000000..e1928a0
--- /dev/null
+++ b/localrundig
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+#
+# rundig
+#
+# $Id: localrundig,v 1.1 2002-01-21 00:18:07 jonas Exp $
+#
+# This is a sample script to create a search database for ht://Dig.
+#
+DBDIR=/var/lib/htdig
+COMMONDIR=/etc/htdig
+BINDIR=/usr/bin
+
+# To help debug problems, try running rundig -vvv
+# This will add lots of debugging output to all of the programs
+stats= opts= alt= init=
+for arg
+do
+ case "$arg" in
+ -a) alt="$arg" ;;
+ -s) stats="$arg" ;;
+ -i) init="$arg" ;;
+ *) opts="$opts $arg" ;; # e.g. -v or -c config
+ esac
+done
+
+#
+# Set the TMPDIR variable if you want htmerge to put files in a location
+# other than the default. This is important if you do not have enough
+# disk space for the big sort that htmerge runs. Also, be aware that
+# on some systems, /tmp is a memory mapped filesystem that takes away
+# from virtual memory.
+#
+TMPDIR=${TMPDIR:-$DBDIR}
+export TMPDIR
+
+$BINDIR/htdig $init $opts $stats $alt
+LC_COLLATE=C $BINDIR/htmerge $opts $stats $alt
+case "$alt" in
+-a)
+ ( cd $DBDIR && test -f db.docdb.work &&
+ for f in *.work
+ do
+ mv -f $f `basename $f .work`
+ done ) ;;
+esac
+# If you're low on disk space and you don't mind completely reindexing
+# every time you run this script, you can always
+# rm $DBDIR/db.wordlist
+# OR
+# If you'd rather run update digs all the time with the minimal databases
+# Keep only the following files (and don't call htdig with -i):
+# db.docdb, db.docdb.work, db.docs.index, db.wordlist.work, db.words.db
+$BINDIR/htnotify $opts
+# If you want to use the soundex and (or) metaphone fuzzy matchings,
+# Uncomment the following line
+# $BINDIR/htfuzzy $opts soundex metaphone
+
+#
+# Create the endings and synonym databases if they don't exist
+# or if they're older than the files they're generated from.
+# These databases are semi-static, so even if pages change,
+# these databases will not need to be rebuilt.
+#
+#if [ "`ls -t $COMMONDIR/english.0 $COMMONDIR/word2root.db 2>/dev/null | sed 1q`" = \
+# "$COMMONDIR/english.0" ]
+#then
+# $BINDIR/htfuzzy $opts endings
+#fi
+#
+#if [ "`ls -t $COMMONDIR/synonyms $COMMONDIR/synonyms.db 2>/dev/null | sed 1q`" = \
+# "$COMMONDIR/synonyms" ]
+#then
+# $BINDIR/htfuzzy $opts synonyms
+#fi