From: Iain Patterson Date: Wed, 2 Dec 2015 11:53:42 +0000 (+0000) Subject: Save path to .bash_profile in PROFILE_RC variable. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=48f30af664cf57c765a763eea7c652da92d66c27;p=profile.git Save path to .bash_profile in PROFILE_RC variable. Use PROFILE_RC to source the profile again if needed. --- diff --git a/.bash_profile b/.bash_profile index 9d6fa56..5170519 100644 --- a/.bash_profile +++ b/.bash_profile @@ -6,6 +6,7 @@ if [ -t 0 -o "${0:0:1}" = "-" -o "$1" = "force" ]; then [ -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