From 30bfdb11b2abdb90e59fa49815f6ef653eb5c211 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Thu, 30 Jan 2014 21:14:08 +0000 Subject: Updated shell setup --- README | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README b/README index 8835f3d..3b49667 100644 --- a/README +++ b/README @@ -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 + -- cgit