pyenv/libexec/rbenv-sh-shell
2011-09-10 20:10:07 -05:00

24 lines
440 B
Bash
Executable file

#!/usr/bin/env bash
set -e
version="$1"
if [ -z "$version" ]; then
if [ -z "$RBENV_VERSION" ]; then
echo "rbenv: no shell-specific version configured" >&2
exit 1
else
echo "echo \"\$RBENV_VERSION\""
exit
fi
fi
if [ "$version" = "--unset" ]; then
echo "unset RBENV_VERSION"
exit 1
fi
# Make sure the specified version is installed.
rbenv-prefix "$version" >/dev/null
echo "export RBENV_VERSION=\"${version}\""