summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2004-04-09 07:13:05 +0000
committerGreg Lewis <glewis@FreeBSD.org>2004-04-09 07:13:05 +0000
commitd842958c65ec0aac8d434dee18a1dbbf37bae7f4 (patch)
tree0f3b2daece5aa6f166fd547e3493294af39ae74d /games
parentBROKEN on alpha: Does not compile (diff)
. Don't print an error trying to remove ${DATADIR} if it can't be removed.
It may contain save files that aren't being forcibly deleted any more. If this is the case, use a pkg-deinstall script to inform the user of how they can manually remove the save files if they are permanently removing the port.
Notes
Notes: svn path=/head/; revision=106547
Diffstat (limited to 'games')
-rw-r--r--games/nethack32/pkg-deinstall16
-rw-r--r--games/nethack32/pkg-plist2
2 files changed, 17 insertions, 1 deletions
diff --git a/games/nethack32/pkg-deinstall b/games/nethack32/pkg-deinstall
new file mode 100644
index 000000000000..c22bc93962b7
--- /dev/null
+++ b/games/nethack32/pkg-deinstall
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+if [ "${2}" = "POST-DEINSTALL" ]; then
+ if [ -d "${PKG_PREFIX}/share/nethack" ]; then
+ echo
+ echo "The ${1} save files have not been removed."
+ echo
+ echo "If you are deleting ${1} permanently then you can "
+ echo "remove the save files with the command:"
+ echo
+ echo " rm -rf ${PKG_PREFIX}/share/nethack"
+ echo
+ fi
+fi
diff --git a/games/nethack32/pkg-plist b/games/nethack32/pkg-plist
index 049ab6dde527..2c8178ae8b2d 100644
--- a/games/nethack32/pkg-plist
+++ b/games/nethack32/pkg-plist
@@ -121,5 +121,5 @@ bin/nethack
%%DATADIR%%/logfile
%%DATADIR%%/record
%%DATADIR%%/perm
-@dirrm %%DATADIR%%
+@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
%%PORTDOCS%%@dirrm %%DOCSDIR%%