| |
1 |
1 |
#!/bin/sh |
| |
2 |
2 |
# |
| |
3 |
3 |
# webspell - Wrapper for Aspell/Ispell that sets the HOME environment variable |
| |
4 |
4 |
# to [ns_info home] ... can't seem to do this from AOLserver Tcl. |
| |
5 |
5 |
# |
| |
6 |
6 |
# Takes five arguments: |
| |
7 |
7 |
# |
| |
8 |
8 |
# $1) AOLserver home. |
| |
9 |
9 |
# $2) Spellcheck binary (Aspell or Ispell). |
| |
10 |
10 |
# $3) Language, in lang or locale format. (Aspell only - Ispell gets "".) |
| |
11 |
11 |
# $4) Local dictionary file (additional words you don't want to get caught by.) |
| |
12 |
12 |
# $5) tmpfile |
| |
13 |
13 |
# |
| |
14 |
14 |
# Root must be able to execute this file if AOLserver runs as root |
| |
15 |
15 |
# (which it does if it runs on a privileged port, e.g., port 80) |
| |
16 |
16 |
|
| |
17 |
17 |
HOME=$1 |
| |
18 |
18 |
export HOME |
| |
19 |
19 |
|
| |
|
20 |
# set default language, in case, no language was given |
| |
|
21 |
LANG=en_US.UTF-8 |
| |
|
22 |
export LANG |
| |
|
23 |
|
| |
20 |
24 |
exec $2 $3 -a -p $4 < $5 |