File: //proc/self/root/etc/profile.d/rbenv.sh
#!/bin/sh
export RBENV_ROOT="/usr/local/share/ruby/rbenv"
LAZY_LOAD_RUBY=${LAZY_LOAD_RUBY:-0}
export PATH="$HOME/.rbenv-usergems/shims:${PATH}"
load_rbenv() {
unset -f rbenv ruby load_rbenv gem
rbenv usergems-rehash 2>/dev/null
rbenv() {
local command="$1"
if [ "$#" -gt 0 ]; then
shift
fi
case "$command" in
rehash|shell|update|use)
eval `rbenv "sh-$command" "$@"`;;
*)
command rbenv "$command" "$@";;
esac
}
}
if [[ $LAZY_LOAD_RUBY -eq 0 ]]; then
load_rbenv
return
fi
rbenv() {
load_rbenv
rbenv "$@"
}
ruby() {
load_rbenv
ruby "$@"
}
gem() {
load_rbenv
gem "$@"
}