mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Consistent style
This commit is contained in:
parent
044eb6c802
commit
735a2bc4e7
1 changed files with 9 additions and 10 deletions
|
@ -1,22 +1,21 @@
|
||||||
#!/usr/bin/env bash -e
|
#!/usr/bin/env bash -e
|
||||||
|
|
||||||
abs_dirname() {
|
abs_dirname() {
|
||||||
orig_dir=`pwd`
|
local cwd="$(pwd)"
|
||||||
path="$1"
|
local path="$1"
|
||||||
|
|
||||||
while [ -n "$path" ]; do
|
while [ -n "$path" ]; do
|
||||||
cd `dirname "$path"`
|
cd "$(dirname "$path")"
|
||||||
name=`basename "$path"`
|
local name="$(basename "$path")"
|
||||||
path=`readlink "$name" || true`
|
path="$(readlink "$name" || true)"
|
||||||
done
|
done
|
||||||
unset name path
|
|
||||||
|
|
||||||
pwd
|
pwd
|
||||||
cd "$orig_dir"
|
cd "$cwd"
|
||||||
unset orig_dir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bindir=`abs_dirname $0`
|
libexec_path="$(abs_dirname "$0")"
|
||||||
export PATH="$bindir:$PATH"
|
export PATH="${libexec_path}:${PATH}"
|
||||||
|
|
||||||
command="$1"
|
command="$1"
|
||||||
if [ -z "$command" ]; then
|
if [ -z "$command" ]; then
|
||||||
|
|
Loading…
Reference in a new issue