available()
{
	which "$1" >/dev/null 2>&1
}

post_install() {
if available update-mime-database
then
	update-mime-database /usr/share/mime >/dev/null
fi

if available update-desktop-database
then
	update-desktop-database -q /usr/share/applications
fi

if available gtk-update-icon-cache
then
	gtk-update-icon-cache -q /usr/share/icons/hicolor
fi
}

post_upgrade() {
	post_install
}

post_remove() {
	post_install
}