Skip to content

Commit

Permalink
script: fix build script regression to work on OSX
Browse files Browse the repository at this point in the history
Use sed instead of cut to accomodate GNU and BSD differences

Fixes: etcd-io#5240
  • Loading branch information
claws committed May 1, 2016
1 parent 262de75 commit c071104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c071104

Please sign in to comment.