scripts/ruby-installer in rvm-0.0.49 vs scripts/ruby-installer in rvm-0.0.50
- old
+ new
@@ -74,44 +74,40 @@
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"
- if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
+ # if [ $? -gt 0 ] ; then result=$? ; return $result ; fi # Don't barf on autoconf fail...
fi
if [ -s ./Makefile -a -z "$rvm_reconfigure_flag" ] ; then
- __rvm_log "warn" "Skipping configure step, Makefile exists so configure must have already been run."
+ __rvm_log "debug" "Skipping configure step, Makefile exists so configure must have already been run."
elif [ -s ./configure ] ; then
__rvm_log "info" "Configuring $rvm_ruby_package_name using $rvm_ruby_configure, this may take a while depending on your cpu(s)..."
if [ -d $rvm_path/usr/include/readline/ ] ; then
- configure_parameters="$configure_parameters --with-readline-dir=$rvm_path/usr/include/readline/"
+ configure_parameters="$configure_parameters --with-readline-dir=$rvm_path/usr/include/readline/ --with-search-path=$rvm_path/usr"
fi
if [ -d $rvm_path/usr/include/iconv/ ] ; then
- configure_parameters="$configure_parameters --with-iconv-dir=$rvm_path/usr/include/iconv/"
+ configure_parameters="$configure_parameters --with-iconv-dir=$rvm_path/usr/include/iconv/ --with-search-path=$rvm_path/usr"
fi
- __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure $configure_parameters"
- unset configure_parameters
+ __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure $configure_parameters --with-search-path=/usr --with-search-path=/usr/local"
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_log "info" "Compiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
- if [ -z "$rvm_ruby_make" ] ; then
- __rvm_run "make" "/usr/bin/make $rvm_make_flags"
- else
- __rvm_run "make" "$rvm_ruby_make $rvm_make_flags"
- fi
+ rvm_ruby_make=${rvm_ruby_make:-"/usr/bin/make"}
+ __rvm_run "make" "$rvm_ruby_make $rvm_make_flags"
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
- if [ -z "$rvm_ruby_make" ] ; then
- __rvm_log "info" "Installing $rvm_ruby_package_name"
- __rvm_run "install" "/usr/bin/make install"
- else
- __rvm_run "install" "$rvm_ruby_make_install"
- fi
+ __rvm_log "info" "Installing $rvm_ruby_package_name"
+ rvm_ruby_make_install=${rvm_ruby_make_install:-"/usr/bin/make install"}
+ __rvm_run "install" "$rvm_ruby_make_install"
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
__rvm_log "info" "Installation of $rvm_ruby_package_name is complete."
GEM_HOME="$rvm_gem_home" ; export GEM_HOME
@@ -129,20 +125,25 @@
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
if [ ! -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
if [ "`uname`" = "Darwin" ] ; then ARCHFLAGS="-arch x86_64 -arch i386" ; export ARCHFLAGS ; fi
case "$rvm_ruby_interpreter" in
-
macruby)
if [ "`uname`" = "Darwin" ] ; then
+ rvm_ruby_interpreter="system"
+ __rvm_select
+ __rvm_use
+ rvm_ruby_interpreter="macruby"
+ __rvm_gi "rake" # Make sure that rake is present
#rvm_macruby_repo_url="${rvm_macruby_repo_url:-"http://svn.macosforge.org/repository/ruby/MacRuby"}"
rvm_macruby_repo_url="${rvm_macruby_repo_url:-"git://github.com/masterkain/macruby.git"}"
rvm_ruby_repo_url=$rvm_macruby_repo_url
#rvm_macruby_nightly_url=`__rvm_db "macruby_nightly_url"`
- rvm_ruby_configure=""
- rvm_ruby_make="rake macruby:build framework_instdir=$rvm_path/macruby-head framework_name=/macruby-head --trace"
- rvm_ruby_make_install="rake framework:install framework_instdir=$rvm_path/macruby-head framework_name=/macruby-head --trace"
+ rvm_ruby_configure=" "
+ rvm_make_flags=" "
+ rvm_ruby_make="cd $rvm_ruby_src_path; /usr/bin/rake macruby:build framework_instdir=$rvm_path/macruby-head framework_name=/macruby-head --trace"
+ rvm_ruby_make_install="cd $rvm_ruby_src_path; /usr/bin/rake framework:install"
rvm_ruby_rev="${rvm_ruby_rev:-head}" # Hard coding this for now
rvm_url=$rvm_ruby_repo_url
DESTDIR="$rvm_ruby_home" ; export DESTDIR
if [ -z "$rvm_ruby_rev" ] ; then
@@ -222,11 +223,11 @@
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_rubinius_repo_url
- rvm_ruby_configure=""
+ 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_rev="head"
@@ -343,21 +344,28 @@
__rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
done ; unset rvm_gem_name
;;
ruby)
- # Merge configure options with user specified options
- rvm_ruby_configure="--enable-shared --enable-pthread $rvm_ruby_configure "
- if [ "`uname`" = "Darwin" ] ; then ARCHFLAGS="-arch x86_64 -arch i386" ; export ARCHFLAGS ; fi
+ if [ "`uname`" = "Darwin" ] ; then
+ ARCHFLAGS="-arch x86_64 -arch i386" ; export ARCHFLAGS
+ if [ "$(echo $rvm_ruby_version | awk '/1\.8/')" ] ; then
+ rvm_ruby_configure="${rvm_ruby_configure:-"--enable-shared --disable-pthread"} "
+ else
+ rvm_ruby_configure="${rvm_ruby_configure:-"--enable-shared"} "
+ fi
+ else
+ rvm_ruby_configure="${rvm_ruby_configure:-"--enable-shared --enable-pthread"} "
+ fi
__rvm_install_source $*
;;
default)
- __rvm_log "fail" "please specify a ruby implementation to install."
+ __rvm_log "fail" "must specify a ruby interpreter to install."
;;
- *) __rvm_log "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
+ *) __rvm_log "fail" "Ruby interpreter '$rvm_ruby_interpreter' is not known."
esac
if [ ! -z "$ruby_options" ] ; then RUBYOPT=$ruby_options ; export RUBYOPT ; fi
}
@@ -387,10 +395,10 @@
__rvm_${rvm_action}_ruby
__rvm_unset_ruby_variables
fi
done < <(/bin/ls $rvm_path/*/bin/ruby 2> /dev/null)
else
- __rvm_log "warn" "Really? Install all? See 'rvm list --all' and limit the selection to something more sane please :)"
+ __rvm_log "warn" 'Really? Install all? See "rvm list --all" and limit the selection to something more sane please :)'
fi
fi
__rvm_state
if [ ! -z "$rvm_summary_flag" ] ; then __rvm_summary ; fi