소스 검색

script: fix build script regression to work on OSX

Use sed instead of cut to accomodate GNU and BSD differences

Fixes: #5240
Chris Laws 9 년 전
부모
커밋
c071104fc4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      build

+ 1 - 1
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"