X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.bash_profile;h=5170519b0f37526c3fbdc585ca17afdcde92e096;hp=6a1eaf8a2cbf7c777e9e2a12ad8c7938c9760649;hb=edf8df9b6f669de383f8763daf87af730c22536a;hpb=2fe3b0c0e43ecc6381b4ed6a05cfa50493d67b56 diff --git a/.bash_profile b/.bash_profile index 6a1eaf8..5170519 100644 --- a/.bash_profile +++ b/.bash_profile @@ -3,8 +3,10 @@ if [ -t 0 -o "${0:0:1}" = "-" -o "$1" = "force" ]; then if [ -z "$PROFILE_HOME" ]; then # BASH_SOURCE isn't available prior to bash 3. profile_home=${BASH_SOURCE%/*} + [ -n "$profile_home" -a -d "$profile_home" -a ! "${profile_home:0:1}" = "/" ] && profile_home=$(readlink -f "$profile_home" 2>/dev/null) [ "$profile_home" = "$BASH_SOURCE" ] && profile_home=$PWD [ "$profile_home" = "$HOME" ] || PROFILE_HOME=$profile_home + PROFILE_RC="$profile_home/.bash_profile" unset profile_home fi