Mercurial > dotfiles
comparison .shell.d/50.common_env.sh @ 136:9b48ec89ffdf
common_env: use new insert_element_into_var to handle PYTHONPATH more safely
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 18 Aug 2009 13:44:26 -0500 |
parents | 82fd8ff94de8 |
children | 5599a864b888 |
comparison
equal
deleted
inserted
replaced
135:de6d0a9a7e3f | 136:9b48ec89ffdf |
---|---|
14 unset MANPATH # smart man(1)s autodetect that from PATH. | 14 unset MANPATH # smart man(1)s autodetect that from PATH. |
15 | 15 |
16 # Python stuff | 16 # Python stuff |
17 export PYTHONSTARTUP="$HOME/.python/startup.py" | 17 export PYTHONSTARTUP="$HOME/.python/startup.py" |
18 | 18 |
19 MYPYTHONPATH="$HOME/unixSoft/lib/python:/opt/hg/lib/python" | 19 insert_element_into_var "$HOME/unixSoft/lib/python" PYTHONPATH |
20 if [[ "$PYTHONPATH" == "" ]] ; then | 20 insert_element_into_var /opt/hg/lib/python PYTHONPATH |
21 export PYTHONPATH="$MYPYTHONPATH" | |
22 else | |
23 export PYTHONPATH="$PYTHONPATH:$MYPYTHONPATH" | |
24 fi | |
25 | 21 |
26 insert_path_element /opt/hg/bin | 22 insert_path_element /opt/hg/bin |
27 | 23 |
28 export HGRCPATH="$HOME/.hgrc:$HOME/.private/hgrc" | 24 export HGRCPATH="$HOME/.hgrc:$HOME/.private/hgrc" |