summaryrefslogtreecommitdiff
path: root/databases/shared-mime-info/DEINSTALL
blob: 933ebe69e52e5da134f47ab215689e1742d9648a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# $NetBSD: DEINSTALL,v 1.4 2011/10/29 13:20:54 marino Exp $

MIMEDB_PATH="@MIMEDB_PATH@"

case ${STAGE} in
POST-DEINSTALL)
	(cd ${MIMEDB_PATH} && \
	 ${LS} . | ${GREP} -v '^packages$' | ${XARGS} ${RM} -rf)
	if [ -d ${MIMEDB_PATH}/packages ]; then
	  if [ -n `${LS} -A ${MIMEDB_PATH}/packages` ]; then
	    ${RMDIR} ${MIMEDB_PATH}/packages
	  fi
	fi
	if [ -d ${MIMEDB_PATH} ]; then
	  if [ -n `${LS} -A ${MIMEDB_PATH}` ]; then
	    ${RMDIR} ${MIMEDB_PATH}
	  fi
	fi
	;;
esac