From c071104fc4e0578b9ca52eca52e4e855a91fbe64 Mon Sep 17 00:00:00 2001 From: Chris Laws Date: Sun, 1 May 2016 12:05:38 +0930 Subject: [PATCH] script: fix build script regression to work on OSX Use sed instead of cut to accomodate GNU and BSD differences Fixes: #5240 --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 930fb0662..2c3d9258c 100755 --- a/build +++ b/build @@ -11,7 +11,7 @@ GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"` LINK_OPERATOR="=" -host_arch=$(GOARCH="" go env | egrep 'GOARCH=' | cut --delimiter='"' --field=2) +host_arch=$(GOARCH="" go env | egrep 'GOARCH=' | sed 's/^GOARCH="\(.*\)".*/\1/') if [ -z "${GOARCH}" ] || [ "${GOARCH}" = "${host_arch}" ]; then out="bin"