mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 23:50:44 +00:00
indentation
This commit is contained in:
parent
5fb9c84e14
commit
87dd5fe2c0
1 changed files with 16 additions and 16 deletions
|
@ -28,26 +28,26 @@ 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
|
||||||
cd "${path%/*}"
|
cd "${path%/*}"
|
||||||
local name="${path##*/}"
|
local name="${path##*/}"
|
||||||
path="$(resolve_link "$name" || true)"
|
path="$(resolve_link "$name" || true)"
|
||||||
done
|
done
|
||||||
|
|
||||||
pwd
|
pwd
|
||||||
cd "$cwd"
|
cd "$cwd"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${RBENV_ROOT}" ]; then
|
if [ -z "${RBENV_ROOT}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue