scripts/manage in rvm-0.1.8 vs scripts/manage in rvm-0.1.9

- old
+ new

@@ -116,22 +116,31 @@ rvm_ruby_repo_url=$rvm_url __rvm_install_source $* result=$? ; if [[ "$result" -gt 0 ]] ; then $rvm_scripts_path/log "error" "There has been an error while trying to install from source. Aborting the installation." ; return $result fi - else # if [[ "nightly" = "$rvm_ruby_version" ]] ; then + elif [[ "nightly" = "$rvm_ruby_version" ]] ; then macruby_path="/usr/local/bin" # TODO: Separated nightly from head. - __rvm_db "macruby_nightly_url" "rvm_url" $rvm_scripts_path/log "info" "Retrieving the latest nightly macruby build..." $rvm_scripts_path/fetch "$rvm_url" result=$? ; if [[ "$result" -gt 0 ]] ; then $rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result fi mv "$rvm_archives_path/macruby_nightly-latest.pkg" "$rvm_archives_path/macruby_nightly.pkg" __rvm_run "macruby/extract" "sudo installer -pkg '$rvm_archives_path/macruby_nightly.pkg' -target '/'" mkdir -p "$rvm_ruby_home/bin" + else # if [[ "nightly" = "$rvm_ruby_version" ]] ; then + macruby_path="/usr/local/bin" + # TODO: Separated nightly from head. + $rvm_scripts_path/log "info" "Retrieving the latest nightly macruby build..." + $rvm_scripts_path/fetch "$rvm_url" + result=$? ; if [[ "$result" -gt 0 ]] ; then + $rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result + fi + __rvm_run "macruby/extract" "sudo installer -pkg '$rvm_archives_path/$rvm_ruby_package_file.pkg' -target '/'" + mkdir -p "$rvm_ruby_home/bin" fi binaries="erb gem irb rake rdoc ri ruby testrb" # Trick to work in more shells :) for binary_name in $(echo $binaries); do # if [[ $binary_name != "gem" ]] ; then prefix="-S" ; fi @@ -560,19 +569,19 @@ PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -) PATH=$rvm_bin_path:$PATH ; export PATH rvm_ruby_home="$rvm_rubies_path/$rvm_ruby_interpreter-$rvm_ruby_version" + builtin cd $rvm_src_path + if [[ ! -d "$rvm_ruby_src_path" ]] || [[ ! -d "$rvm_ruby_src_path/.git" ]] ; then rm -rf $rvm_ruby_src_path __rvm_run "mput.repo" "git clone --depth 1 $rvm_ruby_repo_url $rvm_ruby_src_path" "Cloning $rvm_ruby_repo_url" - builtin cd $rvm_ruby_home + builtin cd $rvm_ruby_src_path else - builtin cd $rvm_ruby_home + builtin cd $rvm_ruby_src_path __rvm_run "mput.repo" "git pull origin trunk" "Pulling from origin trunk" fi - - builtin cd $rvm_ruby_src_path if [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then if which autoconf &> /dev/null ; then __rvm_run "autoconf" "autoconf" "Running autoconf" else