#!/bin/sh
set -e

if [ "$1" = "remove" ]; then
	# Update MIME database only if it's older than the packages dir
	if test -x /usr/bin/update-mime-database -a \
	   /usr/share/mime/mime.cache -ot /usr/share/mime/packages; then
		/usr/bin/update-mime-database /usr/share/mime
	fi
	if test -x /usr/bin/gtk-update-icon-cache; then
		/usr/bin/gtk-update-icon-cache -f /usr/share/icons/hicolor
	fi
fi

#DEBHELPER#
