#! /bin/sh

set -e

case "$1" in
       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
        if [ "$1" = purge -a -e /usr/share/debconf/confmodule ]; then
            . /usr/share/debconf/confmodule
            db_purge
            rm -rf /var/lib/anthy \
                   /var/cache/anthy \
                   /etc/anthy/diclist \
                   /etc/anthy/dict.args
            if [ ! -f /etc/anthy/* ]; then
              rmdir /etc/anthy
            fi
        fi
        ;;

    *)
        echo "postrm 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
