aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-06-15 18:52:37 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-06-15 18:52:37 -0700
commit0ddc8a54ee0bd8357d0546ed5e0057115ce8afec (patch)
tree65f1b34eccc3deed068310a1a98945f1e0ce1540
parent4129397cf3421b3e8afec0402241f696fd613576 (diff)
downloadrbpm-0ddc8a54ee0bd8357d0546ed5e0057115ce8afec.tar.gz
rbpm-0ddc8a54ee0bd8357d0546ed5e0057115ce8afec.tar.xz
Use highest matching version.
-rwxr-xr-xrpath.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/rpath.sh b/rpath.sh
index 7ba2d90..3f05790 100755
--- a/rpath.sh
+++ b/rpath.sh
@@ -120,15 +120,15 @@ rpath_set() {
for dir in "${dirs[@]}"; do
if [[ "${dir##*/}" == *"${1}"* ]]; then
- _clear
- _add "${dir}"
- _export
-
- return
+ match="${dir}"
fi
done
- _die 'no matching ruby found.'
+ [[ -n "${match}" ]] || _die 'no matching ruby found.'
+
+ _clear
+ _add "${match}"
+ _export
}
rpath_clear() {