env_helper

Bradley Giesbrecht brad at pixilla.com
Sun Mar 15 13:28:34 PDT 2009


I have modeled an env setup script after the one apple supplies at / 
usr/libexec/path_helper which is evaluated by /etc/profile.

My idea is to add a line like this at the top of ones .profile file.
eval `/opt/local/libexec/env_helper`

I don't know if this list allows file attachments so if the tar file  
is not attached I will upload it somewhere and send another email with  
a link.
If I should open a trac ticket someone tell me to and I will.

I was thinking this might be a nice way to allow ports to modify the  
users env in a managed fashion. They can drop their env files in the  
proper place and they will be automatically added to the users env.

Also, since the files would be registered to the port if the port is  
deactivated the files can be removed.

I was thinking of making this as a port (env_helper or macports_env)  
that other ports could use or if people thought it useful adding it  
directly to macports.

I started with just path vars and only bash at this point but looking  
at /usr/libexc/path_helper it shouldn't be difficult to add support  
for other shells.

I'm simply naming the files the same as the env var and looping over  
the directory.


//Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: env_helper.tar.gz
Type: application/x-gzip
Size: 1155 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090315/43543b72/attachment.bin>
-------------- next part --------------



More information about the macports-dev mailing list