mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #80 from lordzork/master
rbenv-sh-shell enhancements
This commit is contained in:
commit
63f29341d5
1 changed files with 22 additions and 1 deletions
|
@ -1,2 +1,23 @@
|
|||
#!/bin/sh
|
||||
echo "export RBENV_VERSION=$1"
|
||||
|
||||
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
|
||||
default|reset)
|
||||
echo "unset RBENV_VERSION"
|
||||
;;
|
||||
*)
|
||||
echo "rbenv: version \`$version' is not installed" >&2
|
||||
exit 1
|
||||
esac
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue