#! /bin/sh
# postrm script for debian-reference-*
#
# see: dh_installdeb(1)

set -e

case "$1" in
    remove|purge|upgrade|failed-upgrade|abort-install|abort-upgrade)
	# always try keeping the best index
	if [ -x /usr/share/debian-reference-common/mkindexhtml ] ; then
	  HTMLROOT=/usr/share/debian-reference
	  export HTMLROOT
	  /usr/share/debian-reference-common/mkindexhtml
	else
	  rm -f /usr/share/debian-reference/index.html
	fi
	# remove directory if empty (no --ignore-fail-on-non-empty)
	rmdir /usr/share/debian-reference 2>/dev/null || true
    ;;

    *)
	: # do nothing
    ;;
esac

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

#DEBHELPER#

exit 0

