# rundig

ht://Dig Copyright © 1995-2004 The ht://Dig Group
Please see the file COPYING for license information.

  ## Synopsis

  rundig [options]

  ## Description

  Rundig is a shell script that builds the databases necessary for a typical ht://Dig setup. It runs htdig first to build the initial database, then it runs htpurge to clean up the document and word databases that were created by htdig. It then runs htnotify, and finally runs htfuzzy if necessary, to build the endings and synonyms databases if they're missing or outdated. Rundig uses the "-i" option to htdig, so it always reindexes your web site from scratch when you run it.

  ## Options

  -a
    Use alternate work files. Tells htdig and htpurge to append .work to database files, causing a second copy of the database to be built. This allows the original files to be used by htsearch during the indexing run. After htdig and htpurge are done building the .work database files, rundig will move them into place, replacing the original files.
    This option only works for building a new second copy of the database from scratch, and not for updating an existing database. To do that would require further customization of the rundig script. It's not sufficient to simply remove the "-i" option from htdig in the script. See the Customization section below.
  -c configfile
    Use the specified configfile file instead of the default.
  -s
    Print statistics about the dig after completion.
  -v
    Verbose mode. This increases the verbosity of the programs. Using more than 2 is probably only useful for debugging purposes. The default verbose mode (using only one -v) gives a nice progress report while digging and merging. This progress report can be a bit cryptic, but is explained in the htdig documentation.

  ## Files

  BIN_DIR/htdig, htpurge, htnotify, htfuzzy
    The executable programs called by rundig.
  CONFIG_DIR/htdig.conf
    The default configuration file.
  COMMON_DIR/english.0, english.aff, synonyms
    The default fuzzy match dictionary (input) files.

  ## See Also

  htdig, htpurge, htnotify, htfuzzy, htsearch, and Configuration file format.

  ## Customization

  Because rundig is a shell script, it's easy to customize it as needed. It's also necessary to customize it if you change the settings of your database_dir or common_dir attributes (you'll need to make the corresponding changes to the DBDIR and COMMONDIR variables in the script), if you decide to use other fuzzy algorithms that need their own databases rebuilt, or if you change the names of the endings or synonyms databases or source files. Before customizing the script, be sure to familiarize yourself with the individual programs in the package and how they interact.
  A common mistake is to assume that you can simply take the "-i" option off the htdig command line in rundig to make rundig update rather than reindexing from scratch. This will work as long as you don't use the "-a" option to rundig. The file manipulations that rundig -a does assume that you've created a new database from scratch, and all files are moved from .work files to the original file locations. However, nothing is done before running htdig to move or copy the db.wordlist and db.docdb to .work files before running htdig. The end result is that a rundig -a will still reindex your site from scratch. When it comes to more drastic changes such as this, many users chose to write their own custom script, rather than modifying rundig. For example, see the rundig.sh script in our contributed files.

Last modified: $Date: 2004/06/12 13:39:13 $
SourceForge