#! /bin/sh # postinst script for mecab-jumandic-utf8 set -e srcdir=/usr/share/mecab/dic/juman destdir=/var/lib/mecab/dic/juman-utf8 priority=40 case "$1" in configure) echo "Compiling Juman dictionary for Mecab." /usr/lib/mecab/mecab-dict-index -d ${srcdir} -o ${destdir} -f utf-8 -t utf-8 rm ${destdir}/dicrc 2>/dev/null || true update-alternatives --install /var/lib/mecab/dic/debian mecab-dictionary ${destdir} ${priority} cp ${srcdir}/dicrc ${destdir} ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0