#!/bin/sh
## ----------------------------------------------------------------------
## debian/postrm : postremoval script for libxml-sax-perl
## ----------------------------------------------------------------------

## ----------------------------------------------------------------------
set -e

if [ "${BASEDIR:=/}" = "/" ]; then
    BASEDIR=""
fi

## ----------------------------------------------------------------------
if [ "$1" = purge ]
then
    rm -f $BASEDIR/etc/perl/XML/SAX/ParserDetails.ini
    rmdir --parents --ignore-fail-on-non-empty $BASEDIR/etc/perl/XML/SAX
    rm -rf $BASEDIR/var/lib/libxml-sax-perl
    if which ucf >/dev/null 2>&1
    then
        ucf --purge $BASEDIR/etc/perl/XML/SAX/ParserDetails.ini
    fi
    if which ucfr >/dev/null 2>&1
    then
        ucfr --purge libxml-sax-perl $BASEDIR/etc/perl/XML/SAX/ParserDetails.ini
    fi
fi

## ---------------------------------------------------------------------- 
## automatically generated debhelper commands
#DEBHELPER#

exit 0

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