Run .profile.d scripts in the correct order.
[profile.git] / .bash_profile
index e905a86..e061e9c 100644 (file)
@@ -1,7 +1,15 @@
-#echo "$(date +'%F %T'): pid: $$; ppid: $PPID; tty: $(tty); .bash_profile" >> ~/.nx/spam
+# $Id$
 if $(tty -s) || [ "${0:0:1}" = "-" ]; then
+  # Remember if nocaseglob was on.
+  shopt -q nocaseglob
+  nocg=$?
+  # Turn it off so we source stuff in the right order.
+  shopt -u nocaseglob
+  # And set case-sensitive matching
+  LC_CTYPE=en_GB; LANG=
   for i in ~/.profile.d/*.bashrc; do . $i; done; unset i
+  # Maybe turn it back on.
+  [ $nocg = 0 ] && shopt -s nocaseglob
+  unset nocg
   __ps1
 fi
-#export IP01=.bash_profile
-#export IP01BASH_PROFILE=.bash_profile