scripts/ruby-installer in rvm-0.0.58 vs scripts/ruby-installer in rvm-0.0.59

- old
+ new

@@ -1,9 +1,9 @@ #!/bin/bash function __rvm_install_source { - if [ -z "$rvm_selected_flag" ] ; then __rvm_select $* ; fi + if [ -z "$rvm_ruby_selected_flag" ] ; then __rvm_select $* ; fi __rvm_log "info" "Installing Ruby from source to: $rvm_ruby_home" mkdir -p "$rvm_ruby_log_path" __rvm_pushpop "$rvm_src_path" @@ -42,11 +42,11 @@ if [ -z "$rvm_ruby_revision" ] ; then # TODO: Check if tag v is valid rvm_url="$rvm_ruby_repo_url/tags/$rvm_ruby_tag" rvm_rev="" else - if [ "head" = "$rvm_ruby_revision" -o "trunk" = "$rvm_ruby_revision"] ; then + if [ "head" = "$rvm_ruby_revision" -o "trunk" = "$rvm_ruby_revision" ] ; then rvm_url="$rvm_ruby_repo_url/trunk" rvm_rev="" else rvm_url=$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version} rvm_rev="-r $rvm_ruby_revision" @@ -115,11 +115,11 @@ __rvm_pushpop } function __rvm_install_ruby { - if [ -z "$rvm_selected_flag" ] ; then __rvm_select $* ; fi + if [ -z "$rvm_ruby_selected_flag" ] ; then __rvm_select $* ; fi if [ ! -z "$RUBYOPT" ] ; then ruby_options="$RUBYOPT" ; unset RUBYOPT ; fi if [ "$(uname)" = "Darwin" ] ; then ARCHFLAGS="$rvm_archflags" ; export ARCHFLAGS ; fi case "$rvm_ruby_interpreter" in macruby) @@ -138,11 +138,11 @@ ree) if [ ! -z "$(echo $rvm_ruby_version | awk '/^1\.8/')" -a -z "$rvm_head_flag" ] ; then rvm_url="$(__rvm_db "ree_${rvm_ruby_version}_url")/$rvm_ruby_package_file.tar.gz" __rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_ruby_home" __rvm_pushpop "$rvm_src_path" - if [ -z "$rvm_force_flag" -a -d "$rvm_ruby_src_path" -a ! -z $($rvm_ruby_src_path/*) ] ; then + if [ -z "$rvm_force_flag" -a -d "$rvm_ruby_src_path" -a ! -x "$rvm_ruby_src_path/installer" ] ; then __rvm_log "It appears that the archive has already been extracted. Skipping extract (use --force to force re-download and extract)." else __rvm_log "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..." __rvm_fetch "$rvm_url" if [ $? -gt 0 ] ; then result=$? ; return $result ; fi @@ -326,19 +326,10 @@ __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 ;; ruby) - #if [ "$(uname)" = "Darwin" ] ; then - # if [ "$(echo $rvm_ruby_version | awk '/1\.8/')" ] ; then - # rvm_ruby_configure="${rvm_ruby_configure:-"--enable-shared"} " - # else - # rvm_ruby_configure="${rvm_ruby_configure:-"--enable-shared"} " - # fi - #else - # rvm_ruby_configure="${rvm_ruby_configure:-"--enable-pthread"} " - #fi __rvm_install_source $* ;; default) __rvm_log "fail" "must specify a ruby interpreter to install." @@ -357,12 +348,11 @@ # TODO: Extract the common functionality out of the if below if [ ! -z "$rvm_ruby_string" ] ; then unset rvm_ruby_interpreter rvm_ruby_version __rvm_${rvm_action}_ruby elif [ ! -z "$rvm_ruby_version" ] ;then - for rvm_ruby_selector in $(echo $rvm_ruby_version | tr ',' ' ') ; do - unset rvm_ruby_string + for rvm_ruby_string in $(echo $rvm_ruby_version | tr ',' ' ') ; do __rvm_${rvm_action}_ruby __rvm_unset_ruby_variables done elif [ ! -z "$rvm_ruby_interpreter" ] ; then unset rvm_ruby_string rvm_ruby_version @@ -387,11 +377,11 @@ if [ ! -z "$rvm_yaml_flag" ] ; then __rvm_yaml ; fi if [ ! -z "$rvm_json_flag" ] ; then __rvm_json ; fi } function __rvm_uninstall_ruby { - if [ -z "$rvm_selected_flag" ] ; then __rvm_select $* ; fi + if [ -z "$rvm_ruby_selected_flag" ] ; then __rvm_select $* ; fi if [ ! -z "$rvm_ruby_package_name" ] ; then for dir in $rvm_path ; do if [ -d $dir/$rvm_ruby_package_name ] ; then __rvm_log "info" "Removing $dir/$rvm_ruby_package_name..." @@ -408,10 +398,10 @@ __rvm_log "fail" "Cannot uninstall unknown package '$rvm_ruby_package_name'" fi } function __rvm_remove_ruby { - if [ -z "$rvm_selected_flag" ] ; then __rvm_select $* ; fi + if [ -z "$rvm_ruby_selected_flag" ] ; then __rvm_select $* ; fi if [ ! -z "$rvm_ruby_package_name" ] ; then for dir in $rvm_src_path $rvm_path ; do if [ -d $dir/$rvm_ruby_package_name ] ; then __rvm_log "info" "Removing $dir/$rvm_ruby_package_name..."