scripts/ruby-installer in rvm-0.0.62 vs scripts/ruby-installer in rvm-0.0.63

- old
+ new

@@ -54,16 +54,16 @@ fi if [[ -d "$rvm_ruby_src_path/.svn" ]] ; then cd $rvm_ruby_src_path if [[ -z "$rvm_rev" ]] ; then - svn update + __rvm_run "svn.update" "svn update" else - svn checkout -q $rvm_rev + __rvm_run "svn.checkout" "svn checkout -q $rvm_rev" fi else - svn checkout -q $rvm_rev --force $rvm_url $rvm_ruby_src_path + __rvm_run "svn.checkout" "svn checkout -q $rvm_rev --force $rvm_url $rvm_ruby_src_path" fi if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi fi fi @@ -320,10 +320,71 @@ for rvm_gem_name in jruby-openssl ; do __rvm_run "gems" "$rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q" "Installing $rvm_gem_name" done ; unset rvm_gem_name ;; + mput|shyouhei) + unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC + PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -) + PATH=$rvm_bin_path:$PATH ; export PATH + + rvm_ruby_repo_url=$rvm_shyouhei_repo_url + rvm_ruby_configure=" " + rvm_ruby_src_path=$rvm_ruby_home + # rvm_ruby_make="rake" + # rvm_ruby_make_install="rake install" + rvm_ruby_home="$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version" + # rvm_ruby_revision="head" + + 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" + cd $rvm_ruby_home + else + cd $rvm_ruby_home + __rvm_run "mput.repo" "git pull origin trunk" "Pulling from origin trunk" + fi + + if [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then + rvm_autoconf="$(which autoconf)" + if [[ $? -gt 0 ]] ; then __rvm_log "fail" "rvm expects autoconf" ; result=$? ; return $result ; fi + __rvm_run "autoconf" "$rvm_autoconf" "Running autoconf" + # if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi # Don't barf on autoconf fail... + fi + + if [[ -s ./Makefile ]] && [[ -z "$rvm_reconfigure_flag" ]] ; then + __rvm_log "debug" "Skipping configure step, Makefile exists so configure must have already been run." + elif [[ -s ./configure ]] ; then + __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure $configure_parameters" "Configuring $rvm_ruby_package_name using $rvm_ruby_configure, this may take a while depending on your cpu(s)..." + if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi + unset configure_parameters + elif [[ ! -z "rvm_ruby_configure" ]] ; then + $rvm_ruby_configure + else + __rvm_log "error" "Skipping configure step, 'configure' script does not exist, did autoconf not run successfully?" + fi + + rvm_ruby_make=${rvm_ruby_make:-"/usr/bin/make"} + __rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..." + if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi + + rvm_ruby_make_install=${rvm_ruby_make_install:-"/usr/bin/make install"} + __rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_package_name" + if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi + + __rvm_log "info" "Installation of $rvm_ruby_package_name is complete." + + GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME + GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH + + __rvm_rubygems_setup + __rvm_bin_script + __rvm_run "chmod.bin" "chmod +x $rvm_ruby_home/bin/*" + __rvm_post_install + __rvm_pushpop + ;; + ruby) __rvm_install_source $* ;; default) @@ -449,10 +510,10 @@ __rvm_inject_gem_env "$rvm_ruby_home/bin/$binary" fi ; unset binary } function __rvm_rubygems_setup { - if [[ ! -z "$(echo $rvm_ruby_version | awk '/^1\.9/')" ]] ; then + if [[ ! -z "$(echo $rvm_ruby_version | awk '/^1\.9/')" ]] || [[ ! -z "$(echo $rvm_ruby_interpreter | awk '/^mput/')" ]] ; then # 1.9 has it's own built-in gem command __rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem" __rvm_inject_gem_env "$rvm_ruby_home/bin/gem" cp $rvm_ruby_src_path/bin/gem $rvm_ruby_home/bin/gem __rvm_run "rubygems.update" "$rvm_ruby_home/bin/gem update --system" "Updating rubygems for $rvm_ruby_string"