#! /bin/sh
#	@(#)postremove	1.7 97/04/30 

PATH="/usr/bin:/usr/sbin:${PATH}"
export PATH

# catman is not present in the install boot environment.

if [ ! -f /usr/bin/catman ]; then
	exit 0
fi

# makewhatis needs /usr/lib/getNAME (bug ID 1164837)

if [ -x /usr/bin/catman ] && [ -x /usr/lib/getNAME ] 
then
	/usr/bin/catman -w -M $BASEDIR/SUNWrtvc/man
	if [ ! -s $BASEDIR/SUNWrtvc/man/windex ]; then
		rm -f $BASEDIR/SUNWrtvc/man/windex
		rmdir $BASEDIR/SUNWrtvc/man >/dev/null 2>&1
		rmdir $BASEDIR/SUNWrtvc >/dev/null 2>&1
	fi
fi
exit 0
