From fbb8103d9b90c369b770286ea49b99ecb7352d36 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Sun, 3 Jan 2010 15:48:07 +0000 Subject: [PATCH] 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. --- .bash_profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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=$? -- 2.7.4