scripts/cli in rvm-0.1.43 vs scripts/cli in rvm-0.1.44
- old
+ new
@@ -112,16 +112,22 @@
rvm_gemdir_flag=1
if [[ "system" = "$1" ]] ; then rvm_system_flag=1 ; shift ; fi
if [[ "user" = "$1" ]] ; then rvm_user_flag=1 ; shift ; fi
;;
- rubygems|inspect|list|info|alias|docs)
+ inspect|list|info)
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
;;
@@ -130,11 +136,11 @@
rvm_action="ruby"
rvm_ruby_args="$rvm_token $(__rvm_quote_args "$@")"
rvm_parse_break=1
;;
- exec|cleanup|tools|disk-usage|snapshot)
+ exec|cleanup|tools|disk-usage|snapshot|repair)
rvm_action="$rvm_token"
rvm_ruby_args="$(__rvm_quote_args "$@")"
rvm_parse_break=1
;;
@@ -176,11 +182,11 @@
else
if $rvm_scripts_path/match "$1" "^-" ; then
unset rvm_ruby_strings
else
if $rvm_scripts_path/match "$1" "^[0-9]" ; then
- rvm_ruby_strings=$(echo "$1" | tr ',' ' ') ; shift
+ rvm_ruby_strings=$(echo "$1" | \tr ',' ' ') ; shift
unset rvm_ruby_interpreter
else
if $rvm_scripts_path/match "ruby rbx jruby macruby ree rubinius maglev mput shyouhei ironruby" "$1" ; then
rvm_ruby_strings=$1
rvm_ruby_interpreter=$1
@@ -215,11 +221,11 @@
rvm_ruby_repo_url=$rvm_token
;;
--ree-options)
if [[ ! -z "$1" ]] ; then
- export rvm_ree_options="$(echo $1 | tr ',' ' ')" ; shift
+ export rvm_ree_options="$(echo $1 | \tr ',' ' ')" ; shift
else
rvm_action="error"
rvm_error_message="--ree-options *must* be followed by... well... options."
fi
;;
@@ -277,11 +283,11 @@
rvm_wrapper_name="${rvm_token/--/}"
;;
--alias)
if [[ -n "$1" ]]; then
- export rvm_ruby_aliases="$(echo "$1" | tr ',' ' ')"
+ export rvm_ruby_aliases="$(echo "$1" | \tr ',' ' ')"
shift
fi
;;
--symlink)
@@ -298,13 +304,13 @@
rvm_ruby_args="$@" # list of binaries, or none
rvm_parse_break=1
;;
-h|--help|usage) rvm_action=help ;;
- -G) rvm_gems_path="$1" ; shift ;;
- --source) rvm_src_path="$1" ; shift ;;
- --archives) rvm_archives_path="$1" ; shift ;;
+ -G) path_variable="rvm_gems_path" ; __rvm_set_path_variable ; shift ;;
+ --source) path_variable="rvm_src_path" ; __rvm_set_path_variable ; shift ;;
+ --archives) path_variable="rvm_archives_path" ; __rvm_set_path_variable ; shift ;;
--make) rvm_ruby_make="$1" ; shift ;;
--make-install) rvm_ruby_make_install="$1" ; shift ;;
--nice) rvm_niceness="$1" ; shift ;;
-l|--level) rvm_ruby_patch_level="p$1" ; shift ;;
# TODO: handle this below better (if $1 is null)
@@ -314,21 +320,20 @@
--trace) rvm_trace_flag=1 ; set -x ;;
--proxy) rvm_proxy="$1" ; shift ;;
--disable-llvm|--disable-jit) rvm_llvm_flag=0 ;;
--enable-llvm|--enable-jit) rvm_llvm_flag=1 ;;
- --name)
- rvm_ruby_name="$1"
- shift
- ;;
-
reboot|damnit|wtf|argh|BOOM|boom|wth) $rvm_action="reboot" ;;
--self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--export|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--import|--rvmrc|--sticky|--create|--rvmrc|--gems|--docs)
export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
;;
+ --dump-environment)
+ export rvm_dump_environment_flag="$1"; shift
+ ;;
+
--clang)
export rvm_clang_flag=1
export rvm_prior_cc="$CC"
export CC="clang"
;;
@@ -459,11 +464,11 @@
if [[ -z "$ZSH_VERSION" ]] ; then
trap 'rm -rf "$rvm_tmp_path/$$" >/dev/null 2>&1' 0 1 2 3 15
fi
# Check that this is the current version.
- disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')
+ disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | \tr "\n" '.' | sed 's/\.$//')
if [[ "${rvm_version}" != "${disk_version}" ]] && [[ "reload" != "$1" ]]; then
printf "\nA RVM version ${disk_version} is installed yet ${rvm_version} is loaded.\n Please do one of the following:\n * 'rvm reload'\n * open a new shell\n * source your shell init scripts"
return 1
fi
@@ -499,14 +504,11 @@
else
$rvm_scripts_path/info $rvm_ruby_args
fi
result=$?
;;
- docs) $rvm_scripts_path/docs $rvm_ruby_args ; result=$? ;;
- alias) $rvm_scripts_path/alias $rvm_ruby_args ; result=$? ;;
help) $rvm_scripts_path/help $rvm_ruby_args ; result=$? ;;
- rubygems) $rvm_scripts_path/rubygems $rvm_ruby_args ; result=$? ;;
answer) __rvm_Answer_to_the_Ultimate_Question_of_Life_the_Universe_and_Everything ; result=42 ;;
question) __rvm_ultimate_question ; result=42 ;;
env)
@@ -519,11 +521,11 @@
result=$?
unset rvm_wrapper_name
;;
gemdir|gemhome|gempath)
- $rvm_scripts_path/gemsets $rvm_action
+ $rvm_scripts_path/gemsets "$rvm_action"
result=$?
;;
ruby|gem|rake|exec)
old_rvm_ruby_string=$rvm_ruby_string
@@ -534,10 +536,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)
+ cleanup|tools|snapshot|disk-usage|repair|alias|docs|rubygems)
__rvm_run_script "$rvm_action"
result=$?
;;