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.
-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=$?