#!/bin/sh
#
# webspell -  Wrapper for Aspell/Ispell that sets the HOME environment variable
# to [ns_info home] ... can't seem to do this from AOLserver Tcl.
#
# Takes five arguments:
#
# $1) AOLserver home.
# $2) Spellcheck binary (Aspell or Ispell).
# $3) Language, in lang or locale format. (Aspell only - Ispell gets "".)
# $4) Local dictionary file (additional words you don't want to get caught by.)
# $5) tmpfile
#
# Root must be able to execute this file if AOLserver runs as root
# (which it does if it runs on a privileged port, e.g., port 80)

HOME=$1
export HOME

# set default language, in case, no language was given
LANG=en_US.UTF-8
export LANG

exec $2 $3 -a -p $4 < $5
