Subject: Re: Game score and config file handling
To: Hubert Feyrer <>
From: Todd Vierling <>
List: tech-pkg
Date: 12/02/1998 12:14:13
On Wed, 2 Dec 1998, Hubert Feyrer wrote:

: Following up the recent discussion, i'd like to offer the following
: solutions for handling game score files and config files. The idea on both
: is to keep them on deleting, and generate them only if they aren't already
: present, with a little trick for config files:

This is already done in many pkgs.  Simply put in pseudo-Make and

pkg Makefile...

	${INSTALL_DATA} ${WRKSRC}/mygame_score \
	@if [ ! -f ${PREFIX}/var/mygame_score ]; then \
		${CP} -p ${PREFIX}/var/mygame_score.dist \
			${PREFIX}/var/mygame_score; \


@exec if [ ! -f %D/var/mygame_score ]; then cp -p %D/var/mygame_score.dist %D/var/mygame_score; fi

The file is created if needed, but not deleted or messed with otherwise on
delete or delete-and-reinstall.

Note that just because I proposed an implementation of Hubert's suggestion
does not mean I volunteer to fix anything I haven't already fixed.  8-)

-- Todd Vierling (Personal; Bus.