Debian Codegraph @

debian/mecab-jumandic-utf8.postinst

raw
1 #! /bin/sh
2 # postinst script for mecab-jumandic-utf8
3
4 set -e
5
6 srcdir=/usr/share/mecab/dic/juman
7 destdir=/var/lib/mecab/dic/juman-utf8
8 priority=40
9
10 case "$1" in
11 configure)
12 echo "Compiling Juman dictionary for Mecab."
13 /usr/lib/mecab/mecab-dict-index -d ${srcdir} -o ${destdir} -f utf-8 -t utf-8
14 rm ${destdir}/dicrc 2>/dev/null || true
15 update-alternatives --install /var/lib/mecab/dic/debian mecab-dictionary ${destdir} ${priority}
16 cp ${srcdir}/dicrc ${destdir}
17 ;;
18 abort-upgrade|abort-remove|abort-deconfigure)
19 ;;
20 *)
21 echo "postinst called with unknown argument \`$1'" >&2
22 exit 1
23 ;;
24 esac
25
26 # dh_installdeb will replace this with shell code automatically
27 # generated by other debhelper scripts.
28
29 #DEBHELPER#
30
31 exit 0