From 8cdf71b5393b9b5a4a57d0c0ba7aa4caf098030e Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Fri, 1 Apr 2016 19:21:01 +0100 Subject: [PATCH] realpath() doesn't really work under linux and freebsd, use a simpler and more portable method --- buildscripts/checkgopath.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/buildscripts/checkgopath.sh b/buildscripts/checkgopath.sh index 5f964fbc..61e61c14 100644 --- a/buildscripts/checkgopath.sh +++ b/buildscripts/checkgopath.sh @@ -15,18 +15,13 @@ # limitations under the License. # -## use a portable implementation here `realpath` doesn't exist on Darwin/OS X. -realpath() { - [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" -} - _init() { shopt -s extglob # Fetch real paths instead of symlinks before comparing them PWD=$(env pwd -P) - GOPATH=$(realpath $(go env GOPATH)) + GOPATH=$(cd "$(go env GOPATH)" ; env pwd -P) } main() {