#!/bin/sh
# postinst script for im-config
# vim: set sts=4 expandtab:

set -e

# acb685ae9264be3fc1800f98a70b12bb  80im-switch.1.14
# 044a2f13aa8382902dc8f47dc7da7064  80im-switch.1.16

case "$1" in
    configure)
        IM_SWITCH_HOOK=/etc/X11/Xsession.d/80im-switch
        if [ -f $IM_SWITCH_HOOK ]; then
            IM_SWITCH_HOOK_MD5SUM=$(md5sum < $IM_SWITCH_HOOK|cut -d ' ' -f 1)
            case $IM_SWITCH_HOOK_MD5SUM in
                acb685ae9264be3fc1800f98a70b12bb|044a2f13aa8382902dc8f47dc7da7064)
                    rm -f $IM_SWITCH_HOOK
                ;;
    
                *)
                    echo "ERROR: Unknown hook file exists: $IM_SWITCH_HOOK." >&2
                ;;
            esac
        fi
    ;;

    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

