|
|
Copy variables from GUI to CLI
Another approach would be to modify your startup scripts to read the environment.plist file, going backwards.
IMHO, it would be much simpler than constantly running an update script on your XML file!
Personally, I don't have so many environment variables that I've needed to do this, but this might work:
First, grab Mac::PropertyList:
Then add this line to the appropriate rc file: (I added newlines to avoid page widening)
That would work in sh and bash, csh probably needs to change "$k=$v" to "set $k=$v" or something.
Also, this doesn't handle odd characters, which you'd want to put before the print statement.
The nice thing is that you can edit your environment easily by dropping environment.plist in your Dock.
Copy variables from GUI to CLI
oh, wait, bash and sh need "export $k=$v". |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.20 seconds |
|