Shell agnostic startup flow - env, profile, rc, login
These repeated statements are really ugly:


[ "$MY_STARTUP_DEBUG" = "true" ] &amp;&amp; echo "* In .bash_profile"
[ "$MY_STARTUP_DEBUG" = "true" ] &amp;&amp; echo "\t* Sourcing ${HOME}/.common_env if it exists"



You can do better by using a function, for example:

msg() {
    [ "$MY_STARTUP_DEBUG" = true ] || return
    echo "$@"
}

msg "* In .bash_profile"
msg "\t* Sourcing ${HOME}/.common_env if it exists"


Extra to: I removed the double-quotes around true, as that's unnecessary.



Whenever you see repeated logic, try to use a function.
Here's another helper function that can simplify much of the code:

source_if_exists() {
    msg "\t* Sourcing $1 if it exists"
    [ -f "$1" ] &amp;&amp; source "$1"
}

source_if_exists "${HOME}/.common_env"
source_if_exists "${HOME}/.bash_env"


Note that in the original code, you forgot to double-quote the parameters of the source commands.