[24410] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r24005 - trunk/debathena/config/shell-config/debian

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Sat Sep 12 19:04:24 2009

X-Barracuda-Envelope-From: geofft@mit.edu
Date: Sat, 12 Sep 2009 19:04:12 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <200909122304.n8CN4C73013657@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: geofft
Date: 2009-09-12 19:04:12 -0400 (Sat, 12 Sep 2009)
New Revision: 24005

Modified:
   trunk/debathena/config/shell-config/debian/bash.bashrc.debathena
   trunk/debathena/config/shell-config/debian/changelog
   trunk/debathena/config/shell-config/debian/profile.debathena
Log:
In shell-config:
  * Make sure that 'add' etc. are still available in
    interactive login bash shells, by sourcing bashrc.d/* in
    profile if needed.


Modified: trunk/debathena/config/shell-config/debian/bash.bashrc.debathena
===================================================================
--- trunk/debathena/config/shell-config/debian/bash.bashrc.debathena	2009-09-12 18:31:41 UTC (rev 24004)
+++ trunk/debathena/config/shell-config/debian/bash.bashrc.debathena	2009-09-12 23:04:12 UTC (rev 24005)
@@ -1,10 +1,15 @@
-# This is the Debathena /etc/bash.bashrc configuration.
-# It is only necessary if you are not using debathena-login.
+# This is the Debathena /etc/bash.bashrc configuration, installed by
+# debathena-bash-config.
+DEBATHENA_BASHRC_DIR=/usr/share/debathena-bash-config/bashrc.d
 
 # Source the normal bash.bashrc
 . /etc/bash.bashrc.debathena-orig
 
-# Source all bash scripts in the directory bashrc.d
-# To remove this feature, uninstall the debathena-bash-config package.
-DEBATHENA_BASHRC_DIR=/usr/share/debathena-bash-config/bashrc.d
+# Source all bash scripts in our bashrc.d directory.
 for i in `run-parts --list "$DEBATHENA_BASHRC_DIR"`; do . "$i"; done
+
+# In the event we're being sourced from something sourced by
+# profile.debathena, inform it that bashrc.d/* has already been sourced.
+if [ "$debathena_test_if_bashrc_runs" = 0 ]; then
+    debathena_test_if_bashrc_runs=1
+fi

Modified: trunk/debathena/config/shell-config/debian/changelog
===================================================================
--- trunk/debathena/config/shell-config/debian/changelog	2009-09-12 18:31:41 UTC (rev 24004)
+++ trunk/debathena/config/shell-config/debian/changelog	2009-09-12 23:04:12 UTC (rev 24005)
@@ -1,3 +1,11 @@
+debathena-shell-config (1.11.1) jaunty; urgency=low
+
+  * Make sure that 'add' etc. are still available in
+    interactive login bash shells, by sourcing bashrc.d/* in
+    profile if needed.
+
+ -- Geoffrey Thomas <geofft@mit.edu>  Sat, 12 Sep 2009 18:59:13 -0400
+
 debathena-shell-config (1.11) unstable; urgency=low
 
   * Don't set environment variables in

Modified: trunk/debathena/config/shell-config/debian/profile.debathena
===================================================================
--- trunk/debathena/config/shell-config/debian/profile.debathena	2009-09-12 18:31:41 UTC (rev 24004)
+++ trunk/debathena/config/shell-config/debian/profile.debathena	2009-09-12 23:04:12 UTC (rev 24005)
@@ -1,10 +1,21 @@
-# This is the Debathena /etc/profile configuration.
-# It is only necessary if you are not using debathena-login.
+# This is the Debathena /etc/profile configuration, installed by
+# debathena-bash-config.
 
-# Source the normal profile
+DEBATHENA_PROFILE_DIR=/usr/share/debathena-bash-config/profile.d
+DEBATHENA_BASHRC_DIR=/usr/share/debathena-bash-config/bashrc.d
+
+# First source the normal profile. Sometimes this sources bash.bashrc
+# (e.g., on Ubuntu); sometimes it doesn't. Let's find out!
+debathena_test_if_bashrc_runs=0
 . /etc/profile.debathena-orig
 
-# Source all bash scripts in the profile.d directory
-# To remove this feature, uninstall the debathena-bash-config package.
-DEBATHENA_PROFILE_DIR=/usr/share/debathena-bash-config/profile.d
+# If it didn't, source all bash scripts in our bashrc.d directory.
+if [ -n "$PS1" ] && [ -n "$BASH" ]; then
+    if [ "$debathena_test_if_bashrc_runs" = 0 ]; then
+        for i in `run-parts --list "$DEBATHENA_BASHRC_DIR"`; do . "$i"; done
+    fi
+fi
+unset debathena_test_if_bashrc_runs
+
+# Finally, source all bash scripts in our profile.d directory.
 for i in `run-parts --list "$DEBATHENA_PROFILE_DIR"`; do . "$i"; done


home help back first fref pref prev next nref lref last post