#!/bin/sh
#
# $NetBSD: DEINSTALL,v 1.1 2001/11/01 00:11:41 zuntum Exp $
#

PKGNAME=$1
STAGE=$2

PREFIX="@PREFIX@"
USER="@USER@"
GROUP="@GROUP@"
CAT="@CAT@"
RMDIR="@RMDIR@"

case ${STAGE} in
DEINSTALL)
	;;

POST-DEINSTALL)
	${CAT} << EOF
===========================================================================
If you won't be using ${PKGNAME} any longer, you may want to remove:

  * the \`${USER}' user
EOF

	${RMDIR} ${PREFIX}/share/gnats/gnats-db 2> /dev/null
	if [ -e ${PREFIX}/share/gnats/gnats-db ]; then
		${CAT} << EOF

  * the databases in ${PREFIX}/share/gnats/gnats-db/
EOF
	fi

	${RMDIR} ${PREFIX}/share/gnats 2> /dev/null
	${CAT} << EOF
===========================================================================
EOF
	;;

*)
	echo "Unexpected argument: ${STAGE}"
	exit 1
	;;
esac
exit 0