From a72a81b911367c5a06952bb79ffab30f588f1f44 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Mon, 12 Sep 2011 20:28:24 -0500 Subject: [PATCH] Respect RBENV_ROOT --- bin/rbenv-install | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/rbenv-install b/bin/rbenv-install index 16302970..47af0ff4 100755 --- a/bin/rbenv-install +++ b/bin/rbenv-install @@ -1,2 +1,9 @@ -#!/bin/sh -exec ruby-build $1 ~/.rbenv/versions/$1 +#!/usr/bin/env bash +set -e +[ -n "$RBENV_DEBUG" ] && set -x + +if [ -z "$RBENV_ROOT" ]; then + RBENV_ROOT="${HOME}/.rbenv" +fi + +exec ruby-build "$1" "${RBENV_ROOT}/versions/$1"