Skip to content

Commit

Permalink
Set gem_args.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Dec 11, 2009
1 parent c01739f commit 1a3dd4c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/gems
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ __rvm_gems_load() {
export GEM_PATH="$rvm_ruby_gem_home"
fi

if [[ ! -z "$(echo "$rvm_token" | awk '/\.gem.*$/')" ]] ; then
rvm_gem_set_name="$(echo "$1" | sed 's#\.gem.*##g')"
if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
rvm_gem_set_name="$(echo "$gems_args" | sed 's#\.gem.*##g')"
else
rvm_gem_set_name="$1"
rvm_gem_set_name="$gems_args"
fi ; shift

if [[ -f "$rvm_gem_set_name.gems" ]] ; then
Expand Down Expand Up @@ -245,6 +245,7 @@ if [[ -z "$(which gem 2>/dev/null)" ]] ; then
fi

action="$1" ; shift
gems_args="$*"

if [[ "load" = "$action" ]] ; then
__rvm_gems_load
Expand All @@ -265,3 +266,4 @@ elif [[ "install" = "$action" ]] ; then
else
$rvm_scripts_path/log "error" "gems must be passed an action as the first parameter {load,dump,delete,name,list,gemdir,install}"
fi

0 comments on commit 1a3dd4c

Please sign in to comment.