summaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd/DEINSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'mail/cyrus-imapd/DEINSTALL')
-rw-r--r--mail/cyrus-imapd/DEINSTALL29
1 files changed, 23 insertions, 6 deletions
diff --git a/mail/cyrus-imapd/DEINSTALL b/mail/cyrus-imapd/DEINSTALL
index 707b1d2532b..3c275cc0a14 100644
--- a/mail/cyrus-imapd/DEINSTALL
+++ b/mail/cyrus-imapd/DEINSTALL
@@ -1,21 +1,38 @@
-# $NetBSD: DEINSTALL,v 1.3 2003/08/30 20:22:55 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.4 2005/03/02 21:42:48 wiz Exp $
IMAPDCONF=@IMAPDCONF@
case ${STAGE} in
DEINSTALL)
if [ -f ${IMAPDCONF} ]; then
- imap_dirs=` \
+ IMAPDIRS=`
${AWK} '/configdirectory:/ { print $2 }; \
/partition-.*:/ { print $2 }; \
/sievedir:/ { print $2 }' \
- ${IMAPDCONF} \
- `
- for dir in ${imap_dirs}; do
+ ${IMAPDCONF} | ${SORT} -ur`
+ _IMAPDIRS=
+ for dir in ${IMAPDIRS}; do
+ ${RMDIR} -p ${dir} 2>/dev/null || ${TRUE}
if [ -d ${dir} ]; then
- ALL_DIRS="${ALL_DIRS} ${dir}"
+ _IMAPDIRS="${_IMAPDIRS} ${dir}"
fi
done
+ if [ -n "${_IMAPDIRS}" ]; then
+ ${CAT} << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove
+the following directories:
+
+EOF
+ for dir in ${_IMAPDIRS}; do
+ if [ -d "${dir}" ]; then
+ ${ECHO} " ${dir}"
+ fi
+ done
+ ${CAT} << EOF
+===========================================================================
+EOF
+ fi
fi
;;
esac