#!/bin/sh

htbin=/usr/bin
lib_dir=/usr/local/lib/htdig
db_dir=/var/local/lib/htdig

lang=$1

conffile=$lib_dir/template_$lang.conf
$htbin/htdig -v -i -c $conffile
$htbin/htmerge -v -c $conffile
mkdir -p $db_dir/lang/$lang
$htbin/htfuzzy -v -c $conffile endings soundex metaphone synonyms