scripts/cli in rvm-0.1.44 vs scripts/cli in rvm-0.1.45
- old
+ new
@@ -40,11 +40,11 @@
rvm_ruby_args="$@"
rvm_parse_break=1
;;
use)
- rvm_action=$rvm_token
+ rvm_action="$rvm_token"
rvm_verbose_flag=1
if [[ "ruby" = "$1" ]] ; then shift ; fi
;;
install|uninstall)
@@ -118,16 +118,10 @@
rvm_action="$rvm_token"
rvm_ruby_args="$@"
rvm_parse_break=1
;;
- docs|alias|rubygems)
- rvm_action="$rvm_token"
- rvm_ruby_args="$(__rvm_quote_args "$@")"
- rvm_parse_break=1
- ;;
-
-S)
rvm_action="ruby"
rvm_ruby_args="$rvm_token $(__rvm_quote_args "$@")"
rvm_parse_break=1
;;
@@ -136,11 +130,11 @@
rvm_action="ruby"
rvm_ruby_args="$rvm_token $(__rvm_quote_args "$@")"
rvm_parse_break=1
;;
- exec|cleanup|tools|disk-usage|snapshot|repair)
+ docs|alias|rubygems|exec|cleanup|tools|disk-usage|snapshot|repair|migrate|upgrade)
rvm_action="$rvm_token"
rvm_ruby_args="$(__rvm_quote_args "$@")"
rvm_parse_break=1
;;
@@ -283,11 +277,11 @@
rvm_wrapper_name="${rvm_token/--/}"
;;
--alias)
if [[ -n "$1" ]]; then
- export rvm_ruby_aliases="$(echo "$1" | \tr ',' ' ')"
+ export rvm_ruby_aliases="$(echo "$rvm_ruby_aliases $1" | \tr ',' ' ' | __rvm_strip)"
shift
fi
;;
--symlink)
@@ -346,10 +340,15 @@
rvm_action="error"
rvm_error_message="-j *must* be followed by an integer (normally the # of CPU's in your machine)."
fi
;;
+ --with-rubies)
+ rvm_ruby_strings="$1"
+ shift
+ ;;
+
-C|--configure)
if [[ ! -z "$1" ]] ; then
rvm_ruby_configure_flags="$(echo $1 | sed -e 's#,--# --#g')"
shift
else
@@ -383,11 +382,11 @@
;;
--) rvm_ruby_args="$*" ; rvm_parse_break=1 ;;
*)
- if [[ ! -z "$rvm_token" ]] ; then
+ if [[ -n "$rvm_token" ]] ; then
if [[ "gemset" = "$rvm_action" ]] ; then
if $rvm_scripts_path/match "$rvm_token" "^.+${rvm_gemset_separator}.+$" ; then
rvm_gemset_name="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $2}')"
rvm_ruby_string="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $1}')"
elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
@@ -409,10 +408,14 @@
rvm_ruby_strings="${rvm_ruby_string}${rvm_gemset_separator}${rvm_gemset_name}"
elif $rvm_scripts_path/match "$rvm_token" "^.+${rvm_gemset_separator}.+$" ; then
rvm_gemset_name="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $2}')"
rvm_ruby_string="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $1}')"
rvm_ruby_strings="$rvm_token"
+ elif $rvm_scripts_path/match "$rvm_token" "^.+\\+.+$" ; then
+ rvm_ruby_alias="$(echo "$rvm_token" | awk -F+ '{print $2}')"
+ rvm_ruby_string="$(echo "$rvm_token" | awk -F+ '{print $1}')"
+ rvm_ruby_strings="$rvm_ruby_string"
elif $rvm_scripts_path/match "$rvm_token" "-" ; then
rvm_ruby_string="$rvm_token"
rvm_ruby_strings="$rvm_token"
elif $rvm_scripts_path/match "$rvm_token" "^[0-9].[0-9]" ; then
rvm_ruby_string="$rvm_token"
@@ -474,15 +477,15 @@
__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_version rvm_system_flag rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_patch_names rvm_patch_original_pwd rvm_clang_flag rvm_install_arguments
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=$? ;;
strings) __rvm_strings ; result=$? ;;
version) __rvm_version ; result=$? ;;
@@ -536,10 +539,10 @@
# Restore the state pre-sets.
[[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
unset old_rvm_ruby_string
;;
- cleanup|tools|snapshot|disk-usage|repair|alias|docs|rubygems)
+ cleanup|tools|snapshot|disk-usage|repair|alias|docs|rubygems|migrate|upgrade)
__rvm_run_script "$rvm_action"
result=$?
;;