-
Notifications
You must be signed in to change notification settings - Fork 3
/
SETUP-spell.sh
executable file
·42 lines (31 loc) · 1.03 KB
/
SETUP-spell.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# The standard Ubuntu dictionary contains too few words, so flyspell
# will have to litter draft emails and texts with "misspellings" if we
# cannot provide a better dictionary. This command compiles one.
set -e
cd $(dirname ${BASH_SOURCE[0]})
if [ ! -x /usr/bin/aspell ]
then
echo 'Error: /usr/bin/aspell is missing'
echo 'Please install "aspell"'
echo
exit 1
fi
POOL="http://http.us.debian.org/debian/pool"
wget -c "$POOL/main/s/scowl/wamerican-huge_7.1-1_all.deb"
ar x wamerican-huge_7.1-1_all.deb data.tar.gz
tar xzf data.tar.gz --strip-components=4 \
./usr/share/dict/american-english-huge
sed -i '/^actually$/d' american-english-huge
rm -f ~/.emacs.d/aspell-huge
# The --local-data-dir option is necessary because of:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772415
aspell \
--local-data-dir=/usr/lib/aspell \
--encoding=utf-8 \
--lang=en \
create master ~/.emacs.d/aspell-huge \
< american-english-huge
rm american-english-huge
rm data.tar.gz
rm wamerican-huge_7.1-1_all.deb