Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Sep 2019 09:18:17 +0000 (UTC)
From:      Greg Lewis <glewis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512567 - head/games/nethack32
Message-ID:  <201909220918.x8M9IHLa089012@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glewis
Date: Sun Sep 22 09:18:17 2019
New Revision: 512567
URL: https://svnweb.freebsd.org/changeset/ports/512567

Log:
  Preserve scores during updates
  
  * Treat record and logfile as "samples" so that they will be kept when
    updating if they have anything in them.

Modified:
  head/games/nethack32/Makefile
  head/games/nethack32/pkg-plist

Modified: head/games/nethack32/Makefile
==============================================================================
--- head/games/nethack32/Makefile	Sun Sep 22 09:16:15 2019	(r512566)
+++ head/games/nethack32/Makefile	Sun Sep 22 09:18:17 2019	(r512567)
@@ -65,6 +65,10 @@ pre-install:
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${DATADIR}/save
+	# Make "sample" files from records to prevent them being removed
+	# if they have been altered
+	@${CP} ${STAGEDIR}/${DATADIR}/logfile ${STAGEDIR}/${DATADIR}/logfile.sample
+	@${CP} ${STAGEDIR}/${DATADIR}/record ${STAGEDIR}/${DATADIR}/record.sample
 .if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
 	@${LN} -s -f ${HACKNAME} ${STAGEDIR}${PREFIX}/bin/${HACKLINK}
 .endif

Modified: head/games/nethack32/pkg-plist
==============================================================================
--- head/games/nethack32/pkg-plist	Sun Sep 22 09:16:15 2019	(r512566)
+++ head/games/nethack32/pkg-plist	Sun Sep 22 09:18:17 2019	(r512567)
@@ -86,7 +86,7 @@
 %%DATADIR%%/juiblex.lev
 %%DATADIR%%/knox.lev
 %%DATADIR%%/license
-@(,,664) %%DATADIR%%/logfile
+@sample(games,games,664) %%DATADIR%%/logfile.sample
 %%DATADIR%%/medusa-1.lev
 %%DATADIR%%/medusa-2.lev
 %%DATADIR%%/minefill.lev
@@ -102,7 +102,7 @@
 %%DATADIR%%/perm
 %%DATADIR%%/pet_mark.xbm
 %%DATADIR%%/quest.dat
-@(,,664) %%DATADIR%%/record
+@sample(games,games,664) %%DATADIR%%/record.sample
 @(,,02755) %%DATADIR%%/recover
 %%DATADIR%%/rip.xpm
 %%DATADIR%%/rumors



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909220918.x8M9IHLa089012>