scripts/rvm-install in rvm-0.1.15 vs scripts/rvm-install in rvm-0.1.16

- old
+ new

@@ -1,9 +1,14 @@ #!/usr/bin/env bash unset rvm_auto_flag +install_source_path=$(dirname $0) +if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then + builtin cd $install_source_path +fi + source scripts/version source scripts/utility usage() { echo -e " @@ -28,10 +33,11 @@ --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;; --help|*) usage ;; esac done +__rvm_load_rvmrc if [[ -z "$rvm_path" ]] ; then unset rvm_path if [[ "root" = "$(whoami)" ]] ; then rvm_path="/usr/local/rvm" @@ -53,11 +59,9 @@ # Setup # item="$(tput setaf 2)* $(tput sgr0)" question="\n$(tput setaf 2)<?>$(tput sgr0)" cwd=$(pwd) -source_path="${source_path:-"$(dirname $0 | xargs dirname)"}" -if [[ ! -d "$source_path" ]] ; then unset source_path ; fi source_path="${source_path:-$cwd}" # State what is required to use rvm echo -e "\nInstalling rvm to $rvm_path/ ..." rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"