diff --git a/bin/ruby-build b/bin/ruby-build old mode 100755 new mode 100644 index d5cad32671..e6fd63b7e4 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -3,6 +3,10 @@ set -E exec 3<&2 # preserve original stderr at fd 3 +resolve_link() { + $(type -p greadlink readlink | head -1) $1 +} + abs_dirname() { local cwd="$(pwd)" local path="$1" @@ -10,7 +14,7 @@ abs_dirname() { while [ -n "$path" ]; do cd "${path%/*}" local name="${path##*/}" - path="$(readlink "$name" || true)" + path="$(resolve_link "$name" || true)" done pwd