diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2014-01-30 16:14:08 -0500 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2014-01-30 16:14:08 -0500 |
commit | 30bfdb11b2abdb90e59fa49815f6ef653eb5c211 (patch) | |
tree | 9167bc66c7abfcd1dbcc8dbd4f94002f952cc633 | |
parent | 25e98704ec3810727af1aef42ace874189d06f56 (diff) | |
download | multihome-30bfdb11b2abdb90e59fa49815f6ef653eb5c211.tar.gz |
Updated shell setup
-rw-r--r-- | README | 44 |
1 files changed, 25 insertions, 19 deletions
@@ -1,31 +1,37 @@ -1. Put multihome in your path +1. Put multihome in your path (i.e. ~/bin) 2. Depending on your shell, put the following at the top of its initialization file. CSH (.cshrc): -if ( -f ~/bin/multihome ) then - # Destroy environment - env -i - # Resassign HOME - eval `~/bin/multihome` - if ( -d $HOME ) then - cd $HOME - endif - source ~/.cshrc +setenv PATH ${HOME}/bin:${PATH} +set MULTIHOME=`which multihome` +if ( -x $MULTIHOME ) then + # Destroy environment + env -i + # Resassign HOME + eval `$MULTIHOME` + if ( "$HOME" != "$HOME_ORIG" ) then + cd $HOME + source ~/.cshrc + endif endif BASH (.bash_profile): -if [ -f ~/bin/multihome ]; then - # Destroy environment - env -i - # Resassign HOME - eval `~/bin/multihome` - if [ -d "$HOME" ]; then - cd $HOME - fi - source ~/.bash_profile +export PATH=$HOME/bin:$PATH +MULTIHOME=`which multihome` +if [ -x $MULTIHOME ]; then + HOME_ORIG=$HOME + # Destroy environment + env -i + # Resassign HOME + eval `$MULTIHOME` + if [[ "$HOME" != "$HOME_ORIG" ]]; then + cd $HOME + source ~/.bash_profile + fi fi + |