[Pkg-nethack-devel] nethack/debian nethack-common.postinst,1.3,1.4
Joshua Kwan
joshk-guest@quantz.debian.org
Mon, 13 Oct 2003 17:43:51 +0000
Update of /cvsroot/pkg-nethack/nethack/debian
In directory quantz:/tmp/cvs-serv10585/debian
Modified Files:
nethack-common.postinst
Log Message:
Check for existence of files in old save dir for cases where nethack-common
is newly installed.
Index: nethack-common.postinst
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/debian/nethack-common.postinst,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- nethack-common.postinst 12 Oct 2003 15:43:33 -0000 1.3
+++ nethack-common.postinst 13 Oct 2003 17:43:48 -0000 1.4
@@ -26,7 +26,11 @@
if [ "$1" = "configure" ]; then
# Only do this if we are upgrading from a version of Nethack
# that has incompatible save files from this version.
- if dpkg --compare-versions $2 lt 3.4.0; then
+ # Also check to see whether old save directory exists and contains
+ # files, that means we're upgrading from a version where nethack-common
+ # is new.
+ if dpkg --compare-versions $2 lt 3.4.0 || \
+ [ -d $OLDLOGDIR -a -n "`ls $OLDLOGDIR/save 2>/dev/null || true`" ]; then
# But, it's a non-issue if there were no save files to begin with.
if [ -d $LOGDIR -a -n "`ls $LOGDIR/save 2>/dev/null || true`" ]; then
PROCESSDIRS="$LOGDIR"