available() { command -v $1 >/dev/null 2>&1 } integration() { # Setup Menus if available update-desktop-database then update-desktop-database -q /usr/share/applications fi # Setup MIME types if available update-mime-database then update-mime-database /usr/share/mime >/dev/null fi # Setup Icons touch -c /usr/share/icons/hicolor if available gtk-update-icon-cache then gtk-update-icon-cache -tq /usr/share/icons/hicolor fi } post_install() { integration } post_upgrade() { integration } post_remove() { integration }