Source bash_profile if there's a tty OR if there's a login shell. This is for No...
authorIain Patterson <me@iain.cx>
Mon, 21 Jan 2008 10:54:21 +0000 (10:54 +0000)
committerIain Patterson <me@iain.cx>
Mon, 21 Jan 2008 10:54:21 +0000 (10:54 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@95 6be0d1a5-5cfe-0310-89b6-964be062b18b

.bash_profile

index fcecf15..81a58de 100644 (file)
@@ -1,7 +1,5 @@
 # $Id$
-for i in ~/.profile.d/*.bashrc; do . $i; done
-__ps1
-
-if [ "$OSTYPE" = "cygwin" ]; then
-  shopt -s nocaseglob
+if $(tty -s) || $(shopt -q login_shell); then
+  for i in ~/.profile.d/*.bashrc; do . $i; done
+  __ps1
 fi