dot/bash_profile: Eliminate the already-run guard.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 16 Sep 2012 14:17:07 +0000 (15:17 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 16 Sep 2012 14:20:29 +0000 (15:20 +0100)
Debian's /etc/profile unconditionally sets the PATH to an unhelpful
thing.  If we don't run our profile again, the PATH will be left wrong.
So now we run unconditionally in login shells.  We should continue to
set the `__mdw_profile' flag variable, though, since this clues
`.bashrc' into running us if there's been no login shell since the
environment was cleared.

dot/bash_profile

index 27eec06..d61a7c3 100644 (file)
@@ -2,9 +2,8 @@
 ###
 ### Bash startup things
 
-## Only do any of this if we haven't done it before.  Otherwise we
-## can have loops and lots of wasted time.
-if [ -z "$__mdw_profile" ]; then
+## The `.bashrc' hook will run us if it thinks we haven't been run before.
+## We should therefore let it know.
 export __mdw_profile=done
 
 ###--------------------------------------------------------------------------
@@ -286,9 +285,6 @@ fi
 ## If there's a local hook then run it.
 [ -f "$HOME/.profile-local" ] && . "$HOME/.profile-local"
 
-## End of the `__mdw_profile' guard.
-fi
-
 ## If we haven't run the `.bashrc' yet, and this shell is interactive, then
 ## run it now.
 [ -z "$__mdw_bashrc" ] && [ -t 0 ] && \