mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
build: Simplify host detection
Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
4
build
4
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}"
|
||||
|
||||
Reference in New Issue
Block a user