summaryrefslogtreecommitdiff
path: root/games/falcons-eye
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-19 23:09:59 +0000
committerjlam <jlam@pkgsrc.org>2006-06-19 23:09:59 +0000
commit86adb8d0bce34b224cc76ab791807cad5b2111ef (patch)
tree86e8aecc02bd8ad86d521066d4673997e28ee413 /games/falcons-eye
parent51b785694a550ca9a55b085192a71eb977ea94a2 (diff)
downloadpkgsrc-86adb8d0bce34b224cc76ab791807cad5b2111ef.tar.gz
Improve the DEINSTALL script by checking for the presence of the data
directory before promping the user to remove it. Also rewrite in style expected by pkginstall framework.
Diffstat (limited to 'games/falcons-eye')
-rw-r--r--games/falcons-eye/DEINSTALL26
1 files changed, 14 insertions, 12 deletions
diff --git a/games/falcons-eye/DEINSTALL b/games/falcons-eye/DEINSTALL
index 27dde049e85..b1fa70ff5b8 100644
--- a/games/falcons-eye/DEINSTALL
+++ b/games/falcons-eye/DEINSTALL
@@ -1,17 +1,19 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1.1.1 2002/01/21 11:56:16 pooka Exp $
-#
+# $NetBSD: DEINSTALL,v 1.2 2006/06/19 23:09:59 jlam Exp $
-case $2 in
- DEINSTALL) cat << EOF
-
- =============================================================
- The records, log, settings and savegames were not wiped out
- by this deletion process. If you don't want them around,
- please remove ${PKG_PREFIX}/share/falcons-eye-dir.
- =============================================================
+case "${STAGE}" in
+DEINSTALL)
+ DATADIR="${PKG_PREFIX}/share/falcons-eye-dir"
+ ${RMDIR} -p ${DATADIR} 2>/dev/null || ${TRUE}
+ if ${TEST} -d ${DATADIR}; then
+ ${CAT} << EOF
+======================================================================
+The records, log, settings and savegames were not wiped out by this
+deletion process. If you don't want them around, then please remove
+the following directory:
+ ${DATADIR}
+======================================================================
EOF
+ fi
;;
esac