Skip to content

Commit

Permalink
Don't include ~/.bash_profile or the like, as the user could have set…
Browse files Browse the repository at this point in the history
…tings that would conflict.

Instead, source ~/.xmds/bash_profile during initialisation to provide users with a customisation point if desired.

Document this to users when the XMDS shell starts.
  • Loading branch information
GrahamDennis committed Mar 10, 2014
1 parent 7418887 commit 971ec37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 3 additions & 0 deletions BuildScripts/output_noarch/share/xmds/xmds.conf
Expand Up @@ -133,6 +133,9 @@ are located under
$XMDS_SUPPORT/src/xmds2/examples
You can customise this bash shell by creating the file ~/.xmds/bash_profile
and adding any environment variables there.
For more information please visit the project website:
http://www.xmds.org
Expand Down
10 changes: 3 additions & 7 deletions XMDS/bash_profile
Expand Up @@ -2,13 +2,9 @@

[ -r /etc/profile ] && . /etc/profile

# See man bash for information about this ordering
if [ -r "$HOME/.bash_profile" ]; then
. "$HOME/.bash_profile";
elif [ -r "$HOME/.bash_login" ]; then
. "$HOME/.bash_login";
elif [ -r "$HOME/.profile" ]; then
. "$HOME/.profile";
# This environment can be customised using ~/.xmds/bash_profile
if [ -r "$HOME/.xmds/bash_profile" ]; then
. "$HOME/.xmds/bash_profile";
fi

export XMDS_SHELL=YES
Expand Down

0 comments on commit 971ec37

Please sign in to comment.