File: lookupconfig

package info (click to toggle)
lookup 1.08b-16
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,792 kB
  • sloc: ansic: 12,639; makefile: 247; perl: 174; sh: 53
file content (27 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (9)
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
#!/bin/sh

DICTS="compdic edict enamdict findic geodic kanjidic lifscdic"
DICTS212="edicth kanjd212"
DICDIR=/var/lib/lookup
EDICT=/usr/share/edict

case $# in
0)
;;
*) 	DICTS=$@
;;
esac

cd $DICDIR
for d in $DICTS
do
	rm -f $d $d.jin
	if [ -f $EDICT/$d ]; then
		ln -sf $EDICT/$d .
	elif [ -f $EDICT/$d.gz ]; then
		zcat $EDICT/$d.gz > $d
	else
		continue
	fi
	lookup -write $d
done