pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/falcons-eye Improve the DEINSTALL script by chec...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c6389d355d7c
branches: trunk
changeset: 514874:c6389d355d7c
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Jun 19 23:09:59 2006 +0000
description:
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:
games/falcons-eye/DEINSTALL | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diffs (35 lines):
diff -r c07f67c98258 -r c6389d355d7c games/falcons-eye/DEINSTALL
--- a/games/falcons-eye/DEINSTALL Mon Jun 19 22:38:38 2006 +0000
+++ b/games/falcons-eye/DEINSTALL Mon Jun 19 23:09:59 2006 +0000
@@ -1,17 +1,19 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1.1.1 2002/01/21 11:56:16 pooka Exp $
-#
-
-case $2 in
- DEINSTALL) cat << EOF
+# $NetBSD: DEINSTALL,v 1.2 2006/06/19 23:09:59 jlam Exp $
- =============================================================
- 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
Home |
Main Index |
Thread Index |
Old Index