#!/bin/sh

# postinst for kchmviewer

set -e

if [ -r /etc/osso-af-init/af-defines.sh -a -x /usr/bin/dbus-send ]; then
  source /etc/osso-af-init/af-defines.sh
fi

if [ -x /usr/bin/dbus-send -a -x /usr/bin/gtk-update-icon-cache ]; then
  dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Updating icon cache" || true
fi

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -f /usr/share/icons/hicolor || true
fi

case "$1" in
    configure)
    [ -z "$2" ] && \
    if [ -x /usr/bin/maemo-select-menu-location ]; then
     maemo-select-menu-location kchmviewer.desktop
    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

