#!/bin/sh
# Last modification: Tue, 18 Nov 1997 20:58:29 +0200
# man postrm
#
# This script is run after this package has been removed, both wen
# purging/removing than when upgrading

set -e

oldcatdir="/var/catman"
catdir="/var/cache/man"

# removing all catpages hierarchy
if	[ -d $oldcatdir ]
then	echo "  Removing catpages as well as $oldcatdir hierarchy."
	rm -rf $oldcatdir 2>/dev/null || true
fi
if	[ -d $catdir ]
then	echo "  Removing catpages as well as $catdir hierarchy."
	rm -rf $catdir 2>/dev/null || true
fi

# Permission processing inserted by hand, don't rely on debstd :-(
if	[ -x "$(which suidunregister)" -a -e /etc/suid.conf ]
then	suidunregister -s man-db /usr/lib/man-db/man
	suidunregister -s man-db /usr/lib/man-db/mandb
fi

test -x "$(which update-menus)" && update-menus || true

