Date: Wed, 14 Feb 2007 14:10:36 -0300 From: Alejandro Pulver <alepulver@FreeBSD.org> To: Darren Pilgrim <freebsd@bitfreak.org> Cc: freebsd-ports@freebsd.org Subject: Re: Backing up old installed files? Message-ID: <20070214141036.70239b7f@phobos.mars.bsd> In-Reply-To: <45CE38CE.3000907@bitfreak.org> References: <45CE38CE.3000907@bitfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_kIKzRLkhUxT..rj06/ouHIn
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
On Sat, 10 Feb 2007 13:27:42 -0800
Darren Pilgrim <freebsd@bitfreak.org> wrote:
> I'm writing a port for a script that stores the configuration data in=20
> the same file as the program code itself. The long-term solution is to=20
> move the configuration data to another file, of course; however, that's=20
> proving to be a far slower process than originally expected.
>=20
> Other than delaying the submission until the configuration data is split=
=20
> 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
--Sig_kIKzRLkhUxT..rj06/ouHIn
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
iD8DBQFF00KriV05EpRcP2ERAj3nAJ4mBjRpG5DzhIFUb3i/pWNw634n5QCfdncR
BGL6IxHsQxaGNGXIlMIuhTs=
=fsMs
-----END PGP SIGNATURE-----
--Sig_kIKzRLkhUxT..rj06/ouHIn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070214141036.70239b7f>
