scripts/rvm-install in rvm-0.1.3 vs scripts/rvm-install in rvm-0.1.5

- old
+ new

@@ -28,21 +28,27 @@ --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;; --help|*) usage ;; esac done -if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then + +if [[ -z "$rvm_path" ]] ; then unset rvm_path if [[ "root" = "$(whoami)" ]] ; then rvm_path="/usr/local/rvm" else - rvm_path="$HOME/.rvm" + if [[ -d "$HOME/.rvm" ]] && [[ -s "$HOME/.rvm/scripts/rvm" ]]; then + rvm_path="$HOME/.rvm" + elif [[ -d "/usr/local/rvm" ]] && [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then + rvm_path="/usr/local/rvm" + else + rvm_path="$HOME/.rvm" + fi fi fi source scripts/initialize - __rvm_initialize # # Setup # @@ -59,10 +65,11 @@ rvm_src_path="${rvm_src_path:-"$rvm_path/src"}" rvm_log_path="${rvm_log_path:-"$rvm_path/log"}" rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}" rvm_gem_path="${rvm_gem_path:-"$rvm_path/gems"}" rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}" +rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}" rvm_config_path="${rvm_config_path:-"$rvm_path/config"}" rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}" rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}" rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}" rvm_gem_options="${rvm_gem_options:-"--no-rdoc --no-ri"}" @@ -150,10 +157,10 @@ chmod +x $rvm_symlink_path/rvm chmod +x $rvm_symlink_path/rvmsudo fi echo -e "\n$(tput setaf 2)rvm$(tput sgr0) - shell scripts that allows a user to manage multiple ruby versions in their own account." -$rvm_scripts_path/notes +./scripts/notes echo -e "$(tput setaf 2)RTFM: $(tput sgr0) http://rvm.beginrescueend.com/" echo -e "\n$(tput setaf 2)HELP: $(tput sgr0) http://webchat.freenode.net/?channels=rvm " echo -e "\n********************************************************************************" name="$(awk -F= '/^[[:space:]]*name/{print $2}' ~/.gitconfig 2>/dev/null)"