Skip to content

Commit 795e5ae

Browse files
committed
Merge pull request rbenv#9 from mudge/patch-1
Solaris doesn't come with readlink so use greadlink if available instead.
2 parents b1d097a + c6a552e commit 795e5ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/ruby-build

100755100644
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
set -E
44
exec 3<&2 # preserve original stderr at fd 3
55

6+
resolve_link() {
7+
$(type -p greadlink readlink | head -1) $1
8+
}
9+
610
abs_dirname() {
711
local cwd="$(pwd)"
812
local path="$1"
913

1014
while [ -n "$path" ]; do
1115
cd "${path%/*}"
1216
local name="${path##*/}"
13-
path="$(readlink "$name" || true)"
17+
path="$(resolve_link "$name" || true)"
1418
done
1519

1620
pwd

0 commit comments

Comments
 (0)