scripts/utility in rvm-0.1.36 vs scripts/utility in rvm-0.1.37

- old
+ new

@@ -41,11 +41,11 @@ if [[ ! -z "$value" ]] ; then if [[ -z $variable ]] ; then echo $value else - eval "$variable=$value" + eval "$variable='$value'" fi fi unset key value variable } @@ -118,11 +118,11 @@ unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_import_flag rvm_export_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags rvm_uninstall_flag rvm_install_flag rvm_llvm_flag rvm_ruby_bits rvm_ruby_patch rvm_sticky_flagrvm_rvmrc_flag rvm_gems_flag rvm_only_path_flag rvm_docs_flag } # Unset ruby-specific variables __rvm_unset_ruby_variables() { - unset rvm_ruby_interpreter rvm_ruby_version rvm_url rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_release_version rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_gem_path rvm_ruby_name rvm_ruby_alias rvm_ruby_strings + unset rvm_ruby_interpreter rvm_ruby_version rvm_url rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_release_version rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_gem_path rvm_ruby_name rvm_ruby_alias rvm_ruby_strings rvm_ruby_repo_path } __rvm_set_rvmrc() { if [[ "$HOME" != "$(pwd)" ]] ; then if [[ "$rvm_create_flag" -eq 1 ]] ; then flags="--create " ; fi @@ -165,11 +165,10 @@ rvm_action="ruby" if [[ ! -z "$rvm_debug_flag" ]] ; then printf "\n$rvm_tmp_path/$$.rb:\n$(cat $rvm_tmp_path/$$.rb)" ; fi $rvm_scripts_path/set $rvm_action $rvm_ruby_args } - # Loop over the currently installed rubies and refresh their binscripts. __rvm_bin_scripts() { for rvm_ruby_binary in $rvm_rubies_path/*/bin/ruby ; do if [[ -x "$rvm_ruby_binary" ]] ; then rvm_ruby_string=$(dirname "$rvm_ruby_binary" | xargs dirname | xargs basename) @@ -180,29 +179,11 @@ } # Write the bin/ wrapper script for currently selected ruby. # TODO: Adjust binscript to be able to handle all rubies not just the standard interpreteres. __rvm_bin_script() { - - if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi - -ruby_wrapper=$(cat <<RubyWrapper -#!/usr/bin/env bash - -export GEM_HOME="$rvm_ruby_gem_home" -export GEM_PATH="$rvm_ruby_gem_path" -export BUNDLE_PATH="$rvm_ruby_gem_home" -export MY_RUBY_HOME="$rvm_ruby_home" -export PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:$rvm_ruby_home/bin:$rvm_bin_path:\$PATH" - -exec "$rvm_ruby_binary" "\$@" -RubyWrapper -) - rm -f $rvm_bin_path/$rvm_ruby_package_name - echo "$ruby_wrapper" > $rvm_bin_path/$rvm_ruby_package_name - unset ruby_wrapper - chmod +x $rvm_bin_path/$rvm_ruby_package_name + $rvm_scripts_path/wrapper "$rvm_ruby_string" } # Reset any rvm gathered information about the system and its state. # rvm will refresh the stored information the next time it is called after reset. __rvm_reset() { @@ -271,10 +252,10 @@ if echo $PATH | grep -q 'rvm\/bin:' ; then PATH=$rvm_bin_path:$PATH ; export PATH fi - mkdir -p $rvm_src_path $rvm_bin_path $rvm_archives_path $rvm_gems_path $rvm_tmp_path + mkdir -p $rvm_src_path $rvm_bin_path $rvm_archives_path $rvm_gems_path $rvm_tmp_path $rvm_repo_path } # Update rubygems or binscripts based on CLI selection. __rvm_update() { __rvm_pushpop $rvm_path