scripts/rvm-ruby-installer in rvm-0.0.36 vs scripts/rvm-ruby-installer in rvm-0.0.37

- old
+ new

@@ -1,11 +1,7 @@ #!/bin/bash -# -# Installer -# - function __rvm_install-source { if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi __rvm_log "info" "Installing Ruby from source to: $rvm_ruby_home" @@ -236,11 +232,13 @@ __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q done ;; rbx|rubinius) - __rvm_reset # Requires 1.8 to install due to parsetree. TOOD: Check for 1.8 + parse-tree + # TODO: check if system is 1.8.X otherwise use rvm's 1.8.X and check for parsetree, install if missing + unset GEM_HOME MY_RUBY_HOME IRBRC + PATH="$rvm_default_path" ; export PATH rvm_ruby_repo_url=$rvm_rubinius_repo_url rvm_ruby_configure="" rvm_ruby_make="rake" rvm_ruby_make_install="rake install" rvm_ruby_home="$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version" @@ -276,10 +274,15 @@ cd $rvm_ruby_src_path else __rvm_log "info" "\tDownloading $rvm_package_file, this may take a while depending on your connection..." __rvm_fetch $rvm_url __rvm_log "info" "\tExtracting $rvm_package_file..." - __rvm_run "extract" unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path + rvm_unzip=`which unzip` + if [ $? -ne 0 ] ; then + __rvm_log "error" "\t'unzip' was not found in your PATH. jRuby official release comes as a .zip file, hence 'unzip' is required to extract it. Please install 'unzip' and try again." + else + __rvm_run "extract" unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path + fi cd $rvm_ruby_src_path fi fi __rvm_log "info" "\tInstalling $rvm_ruby_package_name..."