scripts/utility in rvm-0.1.0 vs scripts/utility in rvm-0.1.1

- old
+ new

@@ -74,13 +74,13 @@ $rvm_scripts_path/log "debug" "$file_name:\n$(grep 'rvm' $file_name 2>/dev/null)" fi done if [[ "root" = "$(whoami)" ]] ; then - debug_files="$rvm_path/default $rvm_path/system $rvm_config_path/db /etc/rvmrc /etc/gemrc" + debug_files="$rvm_config_path/default $rvm_config_path/system $rvm_config_path/db /etc/rvmrc /etc/gemrc" else - debug_files="$rvm_path/default $rvm_path/system $rvm_config_path/db $HOME/.rvmrc $HOME/.gemrc" + debug_files="$rvm_config_path/default $rvm_config_path/system $rvm_config_path/db $HOME/.rvmrc $HOME/.gemrc" fi for file_name in $(echo $debug_files); do if [[ -f "$file_name" ]] && [[ -s "$file_name" ]] ; then $rvm_scripts_path/log "debug" "$file_name (filtered):\n$(cat $file_name | awk '!/assword|_key/')\n" @@ -132,11 +132,14 @@ unset log_file command } __rvm_cleanup_variables() { __rvm_unset_ruby_variables - unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_gem_set_name rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_load_flag rvm_dump_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 + + if [[ "$rvm_sticky_gems" = "1" ]] ; then export rvm_gem_set_name ; else unset rvm_gem_set_name ; fi + + 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_load_flag rvm_dump_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_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_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_string rvm_ruby_string 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_patch rvm_ruby_package_file rvm_ruby_package_name } @@ -174,19 +177,19 @@ unset ruby_wrapper chmod +x $rvm_bin_path/$rvm_ruby_package_name } __rvm_load_defaults() { - if [[ ! -s "$rvm_path/system" ]] ; then + if [[ ! -s "$rvm_config_path/system" ]] ; then for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME ; do eval value=\$${variable} if [[ -z "$value" ]] ; then - echo "unset ${variable}" >> $rvm_path/system + echo "unset ${variable}" >> $rvm_config_path/system else eval "export $variable" eval value=\$${variable} - echo "${variable}='$value' ; export ${variable}" >> $rvm_path/system + echo "${variable}='$value' ; export ${variable}" >> $rvm_config_path/system fi done fi __rvm_db "system_ruby" "rvm_system_ruby" @@ -305,11 +308,11 @@ else echo -e " $(tput setaf 2)$version$(tput sgr0) $string" fi done ; unset version - if [[ -f "$rvm_path/default" ]] && [[ -s $rvm_path/default ]] ; then - version=$(grep 'MY_RUBY_HOME' $rvm_path/default | awk -F"'" '{print $2}' | xargs basename) + if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then + version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | awk -F"'" '{print $2}' | xargs basename) if [[ ! -z "$version" ]] ; then string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]" if [[ "$version" = "$current_ruby" ]] ; then echo -e "=> $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string" selected="1"