#! /bin/sh
# prerm script for ess
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see /usr/doc/packaging-manual/

case "$1" in
    remove|upgrade|deconfigure)

#	if [ -f /usr/sbin/dhelp_parse ]; then
#	    /usr/sbin/dhelp_parse -d /usr/share/doc/ess
#	fi

#       install-info --quiet --remove /usr/info/ess.info.gz
        ;;
    failed-upgrade)
        ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installdocs
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/ess ]; then
	rm -f /usr/doc/ess
fi
# End automatically added section

# dhelp processing
if [ -x /usr/sbin/dhelp_parse ]; then
       /usr/sbin/dhelp_parse -d /usr/share/doc/ess/
fi

# Automatically added by dh_installemacsen
if [ -x /usr/lib/emacsen-common/emacs-package-remove ] ; then
	/usr/lib/emacsen-common/emacs-package-remove ess
fi
# End automatically added section
# Automatically added by dh_installinfo
install-info --quiet --remove /usr/share/info/ess.info
# End automatically added section


exit 0


