How do I setup one .bash_profile for both MSI labs and clusters?

(Updated 1/11/13)

By default many MSI systems source the $HOME/.bash_profile on login, but not $HOME/.bashrc. MSI recommends users merge the content of their .bashrc/.bash_profile files into a case statement inside their $HOME/.bashrc. Then, put only the following lines in $HOME/.bash_profile

#### BEGIN CUT ####
# Force a source of .bashrc on all systems unless already sourced
if [ ! $HOMEBASHRCSOURCED ]; then
    . ~/.bashrc
fi
#### END CUT ####
This condition will guarantee that systems which source only .bash_profile by default (i.e., Itasca, Calhoun, etc.), behave the same as other MSI systems. For clarification on when .bashrc or .bash_profile are sourced, refer to this FAQ