#!/bin/sh
# postrm for sgml-data
set -e

case "$1" in
    upgrade)
	# we are the old version being replaced
	# do not bother removing from sgml.catalog, it is just going
	# to be added by the new versions postinst
	:
	;;
    abort-upgrade|abort-install)
	# we are the new version being installed, but
	# we are backing out from an upgrade, because preinst failed
	# however, the catalog is not added until postinst, so NOOP
	:
	;;
    failed-upgrade)
	# we are the new version being installed, but
	# we are backing out from an upgrade, because postrm upgrade
	# failed.  Not sure if this is right, but NOOP
	:
	;;
    remove|purge)
	install-sgmlcatalog --quiet --remove sgml-data
	;;
    *)
        echo "postrm called with unknown argument \`$1\'" >&2
	;;
esac

exit 0
