mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Restore rbenv support
This commit is contained in:
parent
a59d208b9d
commit
8acf539dc8
2 changed files with 12 additions and 4 deletions
14
shell/rbenv
Normal file → Executable file
14
shell/rbenv
Normal file → Executable file
|
|
@ -1,9 +1,17 @@
|
|||
# rbenv
|
||||
# vim: ft=sh
|
||||
# shellcheck shell=bash
|
||||
|
||||
test -d "/opt/rbenv" && RBENV_ROOT="/opt/rbenv"
|
||||
test -d "$HOME/.rbenv" && RBENV_ROOT="$HOME/.rbenv"
|
||||
export RBENV_ROOT
|
||||
|
||||
[[ -n "$RBENV_ROOT" ]] && PATH="$RBENV_ROOT/bin:$PATH"
|
||||
|
||||
which rbenv 2>&1 >/dev/null && eval "$(rbenv init -)"
|
||||
export PATH
|
||||
_has-rbenv() {
|
||||
type rbenv >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if _has-rbenv; then
|
||||
eval "$(rbenv init -)"
|
||||
export PATH
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue