From 4ecb56060465923ea03e22477a4891fb3031ff20 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Tue, 3 May 2016 09:54:44 -0700 Subject: [PATCH] build: Simplify host detection Signed-off-by: Geoff Levand --- build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build b/build index 2c3d9258c3c..fabb28c2e7e 100755 --- a/build +++ b/build @@ -11,9 +11,7 @@ GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"` LINK_OPERATOR="=" -host_arch=$(GOARCH="" go env | egrep 'GOARCH=' | sed 's/^GOARCH="\(.*\)".*/\1/') - -if [ -z "${GOARCH}" ] || [ "${GOARCH}" = "${host_arch}" ]; then +if [ -z "${GOARCH}" ] || [ "${GOARCH}" = "$(go env GOHOSTARCH)" ]; then out="bin" else out="bin/${GOARCH}"