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"