update of PATH

13 views
Skip to first unread message

tcurdt

unread,
Jul 22, 2012, 7:22:03 AM7/22/12
to babush...@googlegroups.com
I have a dep that updates /etc/profile and adds something to the PATH.
Somehow I need to source /etc/profile to verify it made it into the PATH (with in_path?).

But I am not really sure how to do this as this cannot be done through a sub shell. Any thoughts?

cheers,
Torsten

Ben Hoskings

unread,
Aug 6, 2012, 11:35:05 AM8/6/12
to babush...@googlegroups.com
This might be possible with #login_shell, or some variation on it. The mechanics around starting new sessions are really tricky, though.

(On OS X, you can use `login -f` to start a new session with an arbitrary command, much like `zsh -c ls` or similar. That lets you easily check the state of things under a fresh session, like shell configuration, etc. Unfortunately, the default `login` on a Linux box doesn't support arbitrary commands via '-f'.)

- Ben
> --
> To post, email babush...@googlegroups.com
> To unsubscribe, email babushka_app...@googlegroups.com
> ~
> http://babushka.me
> http://github.com/benhoskings/babushka
> http://groups.google.com/group/babushka_app

Reply all
Reply to author
Forward
0 new messages