File: make-ispell-pwli

package info (click to toggle)
pspell-ispell 0.12-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 796 kB
  • ctags: 71
  • sloc: sh: 9,720; cpp: 451; makefile: 61
file content (61 lines) | stat: -rwxr-xr-x 2,188 bytes parent folder | download
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#! /bin/sh

info=`cat <<EOF
american:     en-american         iso8859-1
americanmed:  en-american         iso8859-1
americanmed+: en-american         iso8859-1
americanxlg:  en-american-xlg     iso8859-1
british:      en-british          iso8859-1
britishmed:   en-british          iso8859-1
britishmed+:  en-british          iso8859-1
britishxlg:   en-british-xlg      iso8859-1
english:      en                  iso8859-1
catala:       ca                  iso8859-1
czech:        cs                  iso8859-2
dansk:        da                  iso8859-1
nederlands:   nl                  iso8859-1
esperanto:    eo                  iso8859-3
francais:     fr                  iso8859-1
german:       de                  iso8859-1
deutsch:      de                  iso8859-1
deutschlxg:   de--xlg             iso8859-1
deutschmed:   de                  iso8859-1
ellhnika:     el                  iso8859-7
italian:      it                  iso8859-1
norsk:        no                  iso8859-1
polish:       pl                  iso8859-2
portugues:    pt                  iso8859-1
russian:      ru                  koi8-r
espanol:      es                  iso8859-1
svenska:      sv                  iso8859-1
liet:         lt                  iso8859-13
EOF`

ispelldir=`ispell -vv | grep "LIBDIR" | sed -e 's/^.*"\([^"]*\)".*/\1/'`
#pspell_pkgdatadir=`pspell-config pkgdatadir`
#default_ispell_dictionary=`/usr/sbin/update-alternatives --display ispell-dictionary.hash|grep currently|awk '{print $5}'`

for f in ${ispelldir}/*.hash
do
  base=`basename ${f} .hash`
  l=`echo "${info}" | grep "^${base}:"`
  if [ $? -eq 0 ]
  then
	data=`echo ${l} | sed 's/^.*:  *\(.*\)  *.*$/\1/'`
	charset=`echo ${l} | sed 's/^.*:  *.*  *\(.*\)$/\1/'`
	file=${data}-ispell.pwli
	echo "Creating/updating: ${file}"
	echo ${f} ${charset} > ${file}
  else
#	  if [ ${base} = "default" ]
#	  then
#		newbase=`basename ${default_ispell_dictionary} .hash`
#		l=`echo "${info}" | grep "^${newbase}:"`
#		data=`echo ${l} | sed 's/^.*:  *\(.*\)  *.*$/\1/'`
#		file=${data}-ispell.pwli
#		ln -sf ${file} default-ispell.pwli
#	  else
	    echo "Warning: No Rule for ${ispelldir}/${base}.hash."
#	  fi
  fi
done