X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.bash_profile;h=61a04b58aad6e492fd276e84f86f2580dcd6ff3b;hp=fcecf152d023d17ed2cb726899c981ed35725862;hb=f00d519dd073659e3a079be65c57d5b64cb60a69;hpb=4f30260b134841aa54f7eee1a6218358446e2b27 diff --git a/.bash_profile b/.bash_profile old mode 100755 new mode 100644 index fcecf15..61a04b5 --- a/.bash_profile +++ b/.bash_profile @@ -1,7 +1,24 @@ -# $Id$ -for i in ~/.profile.d/*.bashrc; do . $i; done -__ps1 +if $(tty -s) || [ "${0:0:1}" = "-" -o "$1" = "force" ]; then + # Remember if nocaseglob was on. + shopt -q nocaseglob + nocg=$? + # Turn it off so we source stuff in the right order. + shopt -u nocaseglob -if [ "$OSTYPE" = "cygwin" ]; then - shopt -s nocaseglob + # Remember LC_ALL. + lc_all=$LC_ALL + # Turn it off to set case-sensitive matching + LC_ALL=C + + # Source all scripts. + for i in ${PROFILE_HOME:-~}/.profile.d/*.bashrc; do . "$i"; done; unset i + + # Maybe turn nocaseglob back on. + [ $nocg = 0 ] && shopt -s nocaseglob + + # Reset LC_ALL. + LC_ALL=$lc_all + + unset lc_all nocg + __ps1 fi