aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README44
1 files 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
+