Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure etc_profile_file is assigned.
  • Loading branch information
wayneeseguin committed Mar 25, 2011
1 parent 6132666 commit fc7a2c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/functions/installer
Expand Up @@ -855,6 +855,12 @@ setup_user_profile()
profile_file="$HOME/.bash_profile"
fi

if [[ -d /etc/profile.d ]] ; then
etc_profile_file="/etc/profile.d/rvm.sh"
else
etc_profile_file="/etc/profile"
fi

if ! grep '$HOME/.rvm/scripts/rvm' "$profile_file" >/dev/null 2>&1; then
if [[ ! -s "${etc_profile_file}" ]] ; then
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> "$profile_file"
Expand Down

0 comments on commit fc7a2c5

Please sign in to comment.