#!/bin/sh
# postinst script for gcin

set -e

ua_inst () {
	update-alternatives \
        --install /etc/X11/xinit/xinput.d/$1 xinput-$1 \
        /etc/X11/xinit/xinput.d/$2 $3 ;
}

[ -x /usr/bin/gtk-query-immodules-3.0 ] && /usr/bin/gtk-query-immodules-3.0 --update-cache

case "$1" in
    configure)
        # Set up default
        ua_inst all_ALL gcin  0
        ua_inst zh_CN   gcin 30
        ua_inst ja_JP   gcin 30
        ua_inst zh_TW   gcin 70
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0
