scripts/cli in rvm-0.1.40 vs scripts/cli in rvm-0.1.41

- old
+ new

@@ -1,8 +1,16 @@ #!/usr/bin/env bash __rvm_usage() { cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less} ; } +# alternate usage impl: uses man page +#__rvm_usage() { + #if [[ `which man` ]]; then + #man 1 rvm ; } + #else + #cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less} + #fi +#} __rvm_parse_args() { # TODO: # Make this more robust '__rvm_history' so that it stores *unique* rvm commands. @@ -205,19 +213,13 @@ rvm_action="error" rvm_error_message="--ree-options *must* be followed by... well... options." fi ;; - # For use with --patch - --patch-name) rvm_ruby_patch_name="$1" ; shift ;; - --patch) - if [[ -z "$rvm_ruby_patch" ]] ; then - rvm_ruby_patch="$1" - else - rvm_ruby_patch="$rvm_ruby_patch,$1"; - fi ; shift - rvm_action="${rvm_action:-use}" + --patches|--patch) + rvm_patch_names="$1 $rvm_patch_names"; shift + rvm_patch_original_pwd="$PWD" ;; --head) rvm_head_flag=1 ;; --bin) @@ -326,11 +328,11 @@ fi ;; -C|--configure) if [[ ! -z "$1" ]] ; then - rvm_ruby_configure_flags="$(echo $1 | tr ',' ' ')" + rvm_ruby_configure_flags="$(echo $1 | sed -e 's#,--# --#g')" shift else rvm_action="error" rvm_error_message="--configure *must* be followed by configure flags." fi @@ -448,11 +450,11 @@ __rvm_cleanup_variables __rvm_load_rvmrc __rvm_initialize __rvm_parse_args "$@" - export BUNDLE_PATH GEM_HOME GEM_PATH rvm_ruby_string rvm_action rvm_bin_flag rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_file_name rvm_gemset_name rvm_head_flag rvm_install_on_use_flag rvm_interactive rvm_llvm_flag rvm_make_flags rvm_proxy rvm_remove_flag rvm_ruby_args rvm_ruby_configure_flags rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_name rvm_ruby_patch rvm_ruby_patch_name rvm_ruby_version rvm_system_flag rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag - export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator + export BUNDLE_PATH GEM_HOME GEM_PATH rvm_ruby_string rvm_action rvm_bin_flag rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_file_name rvm_gemset_name rvm_head_flag rvm_install_on_use_flag rvm_interactive rvm_llvm_flag rvm_make_flags rvm_proxy rvm_remove_flag rvm_ruby_args rvm_ruby_configure_flags rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_name rvm_ruby_version rvm_system_flag rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_patch_names rvm_patch_original_pwd + export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_patches_path rvm_patches_path rvm_patchsets_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator result=0 case "$rvm_action" in use) __rvm_use ; result=$? ;; srcdir) __rvm_source_dir ; result=$? ;;