Backing up old installed files?

Alejandro Pulver alepulver at FreeBSD.org
Wed Feb 14 17:38:23 UTC 2007


On Sat, 10 Feb 2007 13:27:42 -0800
Darren Pilgrim <freebsd at bitfreak.org> wrote:

> I'm writing a port for a script that stores the configuration data in 
> the same file as the program code itself.  The long-term solution is to 
> move the configuration data to another file, of course; however, that's 
> proving to be a far slower process than originally expected.
> 
> Other than delaying the submission until the configuration data is split 
> from the script, what can/should I do?

Hello.

You can install the original script in ${PREFIX}/libexec and a wrapper
script in ${PREFIX}/bin, that would copy it to the user's home
directory if not exists and run it from there.

For example, the wrapper script could be (considering it is listed in
SUB_FILES):

#!/bin/sh

test -f ~/.script.sh || cp %%PREFIX%%/libexec/script.sh ~/.script.sh && \
	chmod u+w ~/.script.sh
exec ~/.script.sh "$@"

See games/cube (the wrapper script files/cube_client.in) for an
example, but it considers the program needs to run from its data
directory.

Best Regards,
Ale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20070214/a8bcf256/signature.pgp


More information about the freebsd-ports mailing list