aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2014-01-30 16:14:08 -0500
committerJoe Hunkeler <jhunkeler@gmail.com>2014-01-30 16:14:08 -0500
commit30bfdb11b2abdb90e59fa49815f6ef653eb5c211 (patch)
tree9167bc66c7abfcd1dbcc8dbd4f94002f952cc633 /README
parent25e98704ec3810727af1aef42ace874189d06f56 (diff)
downloadmultihome-30bfdb11b2abdb90e59fa49815f6ef653eb5c211.tar.gz
Updated shell setup
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
+