From: Iain Patterson Date: Sun, 3 Jan 2010 15:48:07 +0000 (+0000) Subject: Allow forcing source of .bash_profile. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=fbb8103d9b90c369b770286ea49b99ecb7352d36;p=profile.git Allow forcing source of .bash_profile. By default .bash_profile is sourced only if we have a controlling terminal or the shell is a login shell. Add the ability to force sourcing by passing the "force" argument to the source command. . ~/.bash_profile force For use in situations where no terminal is available but a full environment setup is required. --- diff --git a/.bash_profile b/.bash_profile index b8e11d4..6c93ffe 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,4 +1,4 @@ -if $(tty -s) || [ "${0:0:1}" = "-" ]; then +if $(tty -s) || [ "${0:0:1}" = "-" -o "$1" = "force" ]; then # Remember if nocaseglob was on. shopt -q nocaseglob nocg=$?