#! /bin/sh

set -e

case "$1" in
    upgrade|install)
	if [ -e /usr/share/doc/ghc6-doc/html/libraries/ ] ; then
	    rm -f /usr/share/doc/ghc6-doc/html/libraries/index.html \
		/usr/share/doc/ghc6-doc/html/libraries/index-frames.html \
		/usr/share/doc/ghc6-doc/html/libraries/doc-index.html
	    rmdir --ignore-fail-on-non-empty /usr/share/doc/ghc6-doc/html/libraries/
	    rmdir --ignore-fail-on-non-empty /usr/share/doc/ghc6-doc/html/
	fi
	;;
    *)
	;;
esac

#DEBHELPER#

exit 0
