Skip to content

Commit

Permalink
New tactic, only load the associated rvmrc file :)
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Mar 25, 2011
1 parent afcb41e commit 86c4015
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions binscripts/rvm-installer
Expand Up @@ -130,20 +130,15 @@ set -o errexit
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
export HOME="${HOME%%+(\/)}" # Remove trailing slashes if they exist on HOME

rvm_ignore_rvmrc=${rvm_ignore_rvmrc:-0}
if [[ $UID -eq 0 ]] ; then
rvm_path="/usr/local/rvm"
[[ $rvm_ignore_rvmrc -eq 0 && -s /etc/rvmrc ]] && source /etc/rvmrc
true ${rvm_path:="/usr/local/rvm"}
else
[[ $rvm_ignore_rvmrc -eq 0 && -s "$HOME/.rvmrc" ]] && source "$HOME/.rvmrc"
rvm_path="$HOME/.rvm"
fi

# Load rvmrc files
rvm_ignore_rvmrc=${rvm_ignore_rvmrc:-0}
if [[ $rvm_ignore_rvmrc -eq 0 ]]; then
for file in /etc/rvmrc "$HOME/.rvmrc" ; do
[[ -s "$file" ]] && source $file
done
fi

true ${rvm_src_path:="$rvm_path/src"}
true ${rvm_archives_path:="$rvm_path/archives"}
rvm_releases_url="http://rvm.beginrescueend.com/releases"
Expand Down

0 comments on commit 86c4015

Please sign in to comment.