Skip to content

Commit

Permalink
Bugfix: Bandaids go sticky side down. (gemset sticky flag now set whe…
Browse files Browse the repository at this point in the history
…n expected).
  • Loading branch information
wayneeseguin committed Sep 6, 2010
1 parent 0b65422 commit 03f686c
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 64 deletions.
14 changes: 12 additions & 2 deletions scripts/cli
Expand Up @@ -409,47 +409,57 @@ __rvm_parse_args() {
if "$rvm_scripts_path/match" "$rvm_token" "^.+${rvm_gemset_separator}.+$" ; then
rvm_gemset_name="${rvm_token/*${rvm_gemset_separator}/}"
rvm_ruby_string="${rvm_token/${rvm_gemset_separator}*/}"

elif echo "$rvm_token" | \grep -q '.gems$' ; then
rvm_file_name="${rvm_token/.gems/}.gems" # Account for possible .gems.gems
# elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
else
rvm_gemset_name="${rvm_token/.gems/}"
rvm_file_name="$rvm_gemset_name.gems"
fi

elif echo "$rvm_token" | \grep -q ',' ; then
rvm_ruby_strings="$rvm_token"
if [[ -z "$rvm_action" ]] ; then
rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
fi

elif "$rvm_scripts_path/match" "$rvm_token" "^${rvm_gemset_separator}" ; then
rvm_action="use"
rvm_gemset_name="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $2}')"
rvm_gemset_name="${rvm_token/*${rvm_gemset_separator}/}"
rvm_ruby_string="$(__rvm_environment_identifier | awk -F${rvm_gemset_separator} '{print $1}')"
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}')"
gemset_name="${rvm_token/*${rvm_gemset_separator}/}"
rvm_ruby_string="$rvm_token"
rvm_ruby_strings="$rvm_token"

elif "$rvm_scripts_path/match" "$rvm_token" "^.+\\+.+$" ; then
rvm_ruby_alias="${rvm_token/*+/}"
rvm_ruby_string="${rvm_token/+*/}"
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"
rvm_ruby_strings="$rvm_token"
rvm_action="${rvm_action:-use}"

elif "$rvm_scripts_path/match" "$rvm_token" "^ree-" ; then
rvm_ruby_string="$rvm_token"
rvm_ruby_strings="$rvm_token"
rvm_action="${rvm_action:-use}"

elif [[ -L "$rvm_rubies_path/$rvm_token" ]] ; then # Alias
rvm_ruby_string=$rvm_token
rvm_ruby_strings="$rvm_token"
rvm_action="${rvm_action:-use}"

else
if "$rvm_scripts_path/match" "$rvm_token" ".rb$" ; then # we have a specified ruby script
rvm_ruby_args=$rvm_token
Expand Down

0 comments on commit 03f686c

Please sign in to comment.