scripts/rvm in rvm-0.0.27 vs scripts/rvm in rvm-0.0.28

- old
+ new

@@ -9,12 +9,12 @@ # function __rvm_meta { rvm_meta_author="Wayne E. Seguin" rvm_meta_author_email="wayneeseguin@gmail.com" rvm_meta_website="http://rvm.beginrescueend.com/" - rvm_meta_version="0.0.27" - rvm_meta_updated="2009.08.31" + rvm_meta_version="0.0.28" + rvm_meta_updated="2009.09.01" } function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; } function __rvm_usage { @@ -208,13 +208,10 @@ # Rubinius sha1's will be available after RC1. rvm_rubinius_repo_url="${rvm_rubinius_repo_url:-"git://github.com/evanphx/rubinius.git"}" rvm_macruby_repo_url="${rvm_macruby_repo_url:-"http://svn.macosforge.org/repository/ruby/MacRuby"}" rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}" - if [ ! -z "$rvm_ruby_configure" ] ; then - rvm_ruby_configure="$(echo $rvm_ruby_configure | tr ',-' ' -')" - fi __rvm_clean-path rvm_result=$(echo $PATH | grep 'rvm\/bin:') if [ -z $rvm_result ] ; then PATH=$rvm_bin_path:$PATH ; export PATH fi @@ -242,10 +239,11 @@ if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then if [ ! -d $rvm_source_path/$rvm_ruby_package_name ] ; then rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}" __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..." __rvm_curl $rvm_url + if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi __rvm_log "info" "\tExtracting $rvm_ruby_package_name ..." mkdir -p $rvm_source_path/$rvm_ruby_package_name nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path fi @@ -304,10 +302,11 @@ rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz" if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then cd $rvm_source_path/$rvm_gem_package_name else __rvm_curl $rvm_gem_url + if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi mkdir -p $rvm_source_path/$rvm_gem_package_name nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path fi # Well this is fun... fix nil error on require_paths: sed -i.orig "s/require_paths\.join/require_paths.to_a.join/" $rvm_source_path/$rvm_gem_package_name/lib/rubygems/gem_path_searcher.rb @@ -370,10 +369,11 @@ if [ -d $rvm_source_path/$rvm_ruby_package_name ] ; then cd $rvm_source_path/$rvm_ruby_package_name else __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..." __rvm_curl $rvm_url + if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi __rvm_log "info" "\tExtracting $rvm_ruby_package_name..." mkdir -p $rvm_source_path/$rvm_ruby_package_name nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path fi if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi @@ -393,14 +393,15 @@ rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz" if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then cd $rvm_source_path/$rvm_gem_package_name else __rvm_curl $rvm_gem_url + if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi mkdir -p $rvm_source_path/$rvm_gem_package_name nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path fi - if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi + if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi # Well this is fun... fix nil error on require_paths: sed -i.orig "s/require_paths\.join/require_paths.to_a.join/" $rvm_source_path/$rvm_gem_package_name/lib/rubygems/gem_path_searcher.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log __rvm_log "info" "Installation of $rvm_ruby_package_name complete." @@ -408,13 +409,13 @@ for rvm_gem_name in rake ; do __rvm_log "info" "Installing $rvm_gem_name" nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_log_path/$rvm_ruby_package_name/gems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/gems.error.log done - ;; + ;; - rbx|rubinius) + rbx|rubinius) rvm_ruby_repo_url=$rvm_rubinius_repo_url rvm_ruby_configure="" rvm_ruby_make="rake" rvm_ruby_make_install="rake install" #rvm_ruby_rev="head" @@ -426,13 +427,13 @@ cd $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version && $rvm_rubinius_jit rake build if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi for binary in ruby irb ; do ln -fs $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/rbx $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/$binary done - ;; + ;; - jruby) + jruby) rvm_package_file="$rvm_ruby_interpreter-bin-$rvm_ruby_version" rvm_url="http://dist.codehaus.org/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.zip" rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}" __rvm_log "info" "Installing jRuby to: $rvm_install_path/$rvm_ruby_package_name" @@ -735,11 +736,11 @@ } function __rvm_reset { PATH="$rvm_default_path" ; export PATH - for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do unset $variable ; done + for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME rvm_prompt ; do unset $variable ; done rm -f $rvm_install_path/default* rm -f $rvm_install_path/current __rvm_select "system" @@ -949,10 +950,19 @@ -P|--prefix) rvm_prefix_path="$1" ; shift ;; -B|--bin) rvm_bin_path="$1" ; shift ;; -S|--source) rvm_source_path="$1" ; shift ;; -A|--archive) rvm_archives_path="$1" ; shift ;; -G|--gems) rvm_gem_path="$1" ; shift ;; - -C|--configure) rvm_ruby_configure="$1" ; shift ;; + -C|--configure) + if [ ! -z "$1" ] ; then + rvm_ruby_configure="$(echo $1 | tr ',-' ' -')" + shift + else + rvm_action="error" + rvm_error_message="--configure *must* be followed by configure flags." + break; + fi + ;; -M|--make) rvm_ruby_make="$1" ; shift ;; -I|--make-install) rvm_ruby_make_install="$1" ; shift ;; -l|--level) rvm_ruby_patch_level="$1" ; shift ;; -n|--nice) rvm_niceness="$1" ; shift ;; -f|--file) rvm_ruby_args="$1" ; shift ;;