aboutsummaryrefslogtreecommitdiffstats
path: root/games/nethack32
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2004-04-09 15:13:05 +0800
committerglewis <glewis@FreeBSD.org>2004-04-09 15:13:05 +0800
commitf0c3cd1866eee24dae280f579771125b418ce40a (patch)
tree0de0f5aa8c52bace765fad36f4927ae72d9f7a7e /games/nethack32
parentd7b261fded4d9a8fe154bd08f44b91f002fd0f0b (diff)
downloadfreebsd-ports-gnome-f0c3cd1866eee24dae280f579771125b418ce40a.tar.gz
freebsd-ports-gnome-f0c3cd1866eee24dae280f579771125b418ce40a.tar.zst
freebsd-ports-gnome-f0c3cd1866eee24dae280f579771125b418ce40a.zip
. 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.
Diffstat (limited to 'games/nethack32')
-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%%