source: trunk/debathena/config/shell-config/debian/profile.debathena @ 24005

Revision 24005, 831 bytes checked in by geofft, 15 years ago (diff)
In shell-config: * Make sure that 'add' etc. are still available in interactive login bash shells, by sourcing bashrc.d/* in profile if needed.
Line 
1# This is the Debathena /etc/profile configuration, installed by
2# debathena-bash-config.
3
4DEBATHENA_PROFILE_DIR=/usr/share/debathena-bash-config/profile.d
5DEBATHENA_BASHRC_DIR=/usr/share/debathena-bash-config/bashrc.d
6
7# First source the normal profile. Sometimes this sources bash.bashrc
8# (e.g., on Ubuntu); sometimes it doesn't. Let's find out!
9debathena_test_if_bashrc_runs=0
10. /etc/profile.debathena-orig
11
12# If it didn't, source all bash scripts in our bashrc.d directory.
13if [ -n "$PS1" ] && [ -n "$BASH" ]; then
14    if [ "$debathena_test_if_bashrc_runs" = 0 ]; then
15        for i in `run-parts --list "$DEBATHENA_BASHRC_DIR"`; do . "$i"; done
16    fi
17fi
18unset debathena_test_if_bashrc_runs
19
20# Finally, source all bash scripts in our profile.d directory.
21for i in `run-parts --list "$DEBATHENA_PROFILE_DIR"`; do . "$i"; done
Note: See TracBrowser for help on using the repository browser.