#!/bin/sh
## ----------------------------------------------------------------------
## debian/prerm: pre-removal script for debiandoc-sgml
## ----------------------------------------------------------------------

## ----------------------------------------------------------------------
## Abort if any command returns an error value
set -e

## ----------------------------------------------------------------------
## Handle action to be performed
case "$1"
in

    remove)

	## --------------------------------------------------------------
	## Remove doc-base entries
	if command -v install-docs >/dev/null 2>&1;
	then
	    install-docs --remove debiandoc-sgml
	fi

	## --------------------------------------------------------------
	## Remove SGML catalog entries
	install-sgmlcatalog --remove debiandoc-sgml

    ;;

    deconfigure)
    ;;

    upgrade)
    ;;

    failed-upgrade)
    ;;

    *)
	echo "$0: didn't understand being called with \`$1'" 1>&2
	exit 0
    ;;

esac

## ----------------------------------------------------------------------
exit 0

## ----------------------------------------------------------------------
