Debian Codegraph @

debian/update-cmigemo-dict

raw symbols SCIP
1 #!/bin/sh
2 # dictionary update script for cmigemo
3 #
4 set -e
5
6 # check scripts
7 SKK2MIGEMO_PL=/usr/share/cmigemo/tools/skk2migemo.pl
8 [ -x $SKK2MIGEMO_PL ] || exit 1
9 OPTIMIZE_DICT_PL=/usr/share/cmigemo/tools/optimize-dict.pl
10 [ -x $OPTIMIZE_DICT_PL ] || exit 1
11
12 # check source file
13 if [ x"$1" = x"" ]; then
14 SKKDIC_SRC=/usr/share/skk/SKK-JISYO.L
15 else
16 [ -f $1 ] && SKKDIC_SRC=$1
17 fi
18 [ -z $SKKDIC_SRC ] && _exit 1
19
20 _make_cp932 () {
21 echo -n "create cp932 dictionary ..."
22 $SKK2MIGEMO_PL < $SKKDIC_SRC | $OPTIMIZE_DICT_PL | nkf -s \
23 > /usr/share/cmigemo/cp932/migemo-dict
24 echo "done"
25 }
26 _make_eucjp () {
27 echo -n "create euc-jp dictionary ..."
28 $SKK2MIGEMO_PL < $SKKDIC_SRC | $OPTIMIZE_DICT_PL | nkf -e \
29 > /usr/share/cmigemo/euc-jp/migemo-dict
30 echo "done"
31 }
32 _make_utf8 () {
33 echo -n "create utf-8 dictionary ..."
34 $SKK2MIGEMO_PL < $SKKDIC_SRC | $OPTIMIZE_DICT_PL | nkf -w \
35 > /usr/share/cmigemo/utf-8/migemo-dict
36 echo "done"
37 }
38
39 # create dictinaries...
40 _make_cp932
41 _make_eucjp
42 _make_utf8
43
44 exit 0