Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix detecting source ruby version for upgrade, fix #1424

  • Loading branch information...
commit 1999359ca67ef8dd254c73b47016e61a08608c3a 1 parent c93226b
@mpapis mpapis authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 scripts/upgrade
View
13 scripts/upgrade
@@ -57,22 +57,19 @@ expand_ruby_name()
existing_ruby_patch()
{
- if
- "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep -E "^ruby-$1|^$1$" >/dev/null
- then
- echo "$1"
- else
+ {
+ "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep -E "^ruby-$1|^$1$" ||
(
rvm_ruby_string="$1"
__rvm_ruby_string
if "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep "^${rvm_ruby_interpreter}-${rvm_ruby_version}-" >/dev/null
then
- "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep "^${rvm_ruby_interpreter}-${rvm_ruby_version}-" | sort | tail -n 1
+ "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep "^${rvm_ruby_interpreter}-${rvm_ruby_version}-"
else
- "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep "^${rvm_ruby_interpreter}-" | sort | tail -n 1
+ "$rvm_scripts_path/list" strings | GREP_OPTIONS="" \grep "^${rvm_ruby_interpreter}-"
fi
)
- fi
+ } | sort | tail -n 1
}
highest_ruby_patch()
Please sign in to comment.
Something went wrong with that request. Please try again.