diff options
-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 + |