[Pkg-nethack-devel] nethack/debian nethack-common.config,1.2,1.3
Ben Gertzfield
che@quantz.debian.org
Mon, 13 Oct 2003 18:53:03 +0000
Update of /cvsroot/pkg-nethack/nethack/debian
In directory quantz:/tmp/cvs-serv19896
Modified Files:
nethack-common.config
Log Message:
Add test for old /var/lib/games/nethack to debconf prompt for backing up
files.
Add quotes around $2 (may not be defined in a new install)
Index: nethack-common.config
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/debian/nethack-common.config,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- nethack-common.config 12 Oct 2003 15:43:33 -0000 1.2
+++ nethack-common.config 13 Oct 2003 18:53:00 -0000 1.3
@@ -4,7 +4,12 @@
. /usr/share/debconf/confmodule
-if dpkg --compare-versions $2 lt 3.4.0; then
+LOGDIR=/var/games/nethack
+OLDLOGDIR=/var/lib/games/nethack
+
+if dpkg --compare-versions "$2" lt 3.4.0 || \
+ [ -d $OLDLOGDIR -a -n "`ls $OLDLOGDIR/save 2>/dev/null || true`" ]; then
+
# Save games are not to be treated lightly!
db_input high nethack-common/backup-incompatible || true
db_go