mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-28 21:12:29 -05:00
commit
75a1dd25cd
1 changed files with 18 additions and 18 deletions
|
@ -28,15 +28,15 @@ if enable -f "${BASH_SOURCE%/*}"/../libexec/rbenv-realpath.dylib realpath 2>/dev
|
||||||
else
|
else
|
||||||
[ -z "$RBENV_NATIVE_EXT" ] || abort "failed to load \`realpath' builtin"
|
[ -z "$RBENV_NATIVE_EXT" ] || abort "failed to load \`realpath' builtin"
|
||||||
|
|
||||||
READLINK=$(type -p greadlink readlink | head -1)
|
READLINK=$(type -p greadlink readlink | head -1)
|
||||||
[ -n "$READLINK" ] || abort "cannot find readlink - are you missing GNU coreutils?"
|
[ -n "$READLINK" ] || abort "cannot find readlink - are you missing GNU coreutils?"
|
||||||
|
|
||||||
resolve_link() {
|
resolve_link() {
|
||||||
$READLINK "$1"
|
$READLINK "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
abs_dirname() {
|
abs_dirname() {
|
||||||
local cwd="$(pwd)"
|
local cwd="$PWD"
|
||||||
local path="$1"
|
local path="$1"
|
||||||
|
|
||||||
while [ -n "$path" ]; do
|
while [ -n "$path" ]; do
|
||||||
|
@ -47,7 +47,7 @@ abs_dirname() {
|
||||||
|
|
||||||
pwd
|
pwd
|
||||||
cd "$cwd"
|
cd "$cwd"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${RBENV_ROOT}" ]; then
|
if [ -z "${RBENV_ROOT}" ]; then
|
||||||
|
@ -58,10 +58,10 @@ fi
|
||||||
export RBENV_ROOT
|
export RBENV_ROOT
|
||||||
|
|
||||||
if [ -z "${RBENV_DIR}" ]; then
|
if [ -z "${RBENV_DIR}" ]; then
|
||||||
RBENV_DIR="$(pwd)"
|
RBENV_DIR="$PWD"
|
||||||
else
|
else
|
||||||
cd "$RBENV_DIR" 2>/dev/null || abort "cannot change working directory to \`$RBENV_DIR'"
|
cd "$RBENV_DIR" 2>/dev/null || abort "cannot change working directory to \`$RBENV_DIR'"
|
||||||
RBENV_DIR="$(pwd)"
|
RBENV_DIR="$PWD"
|
||||||
cd "$OLDPWD"
|
cd "$OLDPWD"
|
||||||
fi
|
fi
|
||||||
export RBENV_DIR
|
export RBENV_DIR
|
||||||
|
|
Loading…
Reference in a new issue