pyenv/libexec/rbenv-sh-shell

24 lines
431 B
Text
Raw Normal View History

2011-08-23 12:35:06 -04:00
#!/bin/sh
2011-09-09 08:18:14 -04:00
if [ -z "$1" ]; then
echo "Please specify one of the following Ruby versions to use:" >&2
echo "" >&2
echo "$(rbenv-versions)" >&2
exit 1
fi
version=$1
if [ -d "$HOME/.rbenv/versions/$version" ]; then
echo "export RBENV_VERSION=$version"
else
case $version in
2011-09-09 11:45:23 -04:00
default)
echo "unset RBENV_VERSION"
;;
*)
echo "rbenv: version \`$version' is not installed" >&2
exit 1
esac
2011-09-09 08:18:14 -04:00
fi