Re: Backing up old installed files?

2007-02-14 Thread Alejandro Pulver
On Sat, 10 Feb 2007 13:27:42 -0800
Darren Pilgrim [EMAIL PROTECTED] 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


signature.asc
Description: PGP signature


Re: Backing up old installed files?

2007-02-14 Thread Darren Pilgrim

Alejandro Pulver wrote:

On Sat, 10 Feb 2007 13:27:42 -0800
Darren Pilgrim [EMAIL PROTECTED] 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.


That wouldn't work in this case.  The script is a daemon (postfix policy 
service), not a user program.


The best I've come up with so far is to install the script to 
${PREFIX}/share/${PORTNAME}, then add a note to pkg-message to have the 
user copy the script to runnable location (i.e., the postfix config 
directory), edit the internal config and set the path in /etc/rc.conf. 
This means a manual step to install/upgrade and an orphan when the port 
is deinstalled, but it's the least-evil solution I've come up with.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Backing up old installed files?

2007-02-10 Thread Darren Pilgrim
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?

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]