Skip to content

Commit

Permalink
build: Simplify host detection
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Levand <geoff@infradead.org>
  • Loading branch information
glevand committed May 3, 2016
1 parent b7639b0 commit 4ecb560
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 4ecb560

Please sign in to comment.