Save path to .bash_profile in PROFILE_RC variable.
authorIain Patterson <me@iain.cx>
Wed, 2 Dec 2015 11:53:42 +0000 (11:53 +0000)
committerIain Patterson <me@iain.cx>
Thu, 11 Feb 2016 13:09:16 +0000 (13:09 +0000)
Use PROFILE_RC to source the profile again if needed.

.bash_profile

index 9d6fa56..5170519 100644 (file)
@@ -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