#!/bin/sh

set -e

if [ -x /usr/bin/update-menus ]; then 
    update-menus
fi

if [ "$1" = "remove" ] && which update-desktop-database >/dev/null 2>&1 ; then
	update-desktop-database -q
fi

if [ -x /usr/sbin/update-mime ]; then
    update-mime
fi

if [ "$1" != "upgrade" ]; then
  update-alternatives --remove lynx /usr/bin/lynx.stable
fi
