#!/bin/sh -e

if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
    update-alternatives --remove x-www-browser /usr/bin/iceweasel
    update-alternatives --remove gnome-www-browser /usr/bin/iceweasel
fi

if [ "$1" = "remove" ]; then
    rm -f /usr/lib/iceweasel/components/compreg.dat \
          /usr/lib/iceweasel/components/xpti.dat
    rm -rf /usr/lib/iceweasel/updates
fi

#DEBHELPER#
