mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Use parameter expansion for basename + dirname
These are built-ins, and they're used elsewhere in the code.
This commit is contained in:
parent
b6ebc2f08b
commit
67d3d6b12d
1 changed files with 2 additions and 2 deletions
|
@ -5,8 +5,8 @@ abs_dirname() {
|
|||
local path="$1"
|
||||
|
||||
while [ -n "$path" ]; do
|
||||
cd "$(dirname "$path")"
|
||||
local name="$(basename "$path")"
|
||||
cd "${path%/*}"
|
||||
local name="${path##*/}"
|
||||
path="$(readlink "$name" || true)"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue