2014-03-04 16:36:05 -08:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2014-05-10 01:42:57 -07:00
|
|
|
ORG_PATH="github.com/coreos"
|
|
|
|
REPO_PATH="${ORG_PATH}/coreos-cloudinit"
|
|
|
|
|
2014-05-22 14:37:19 -04:00
|
|
|
if [ ! -h gopath/src/${REPO_PATH} ]; then
|
|
|
|
mkdir -p gopath/src/${ORG_PATH}
|
|
|
|
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
|
|
|
|
fi
|
|
|
|
|
2014-03-04 16:36:05 -08:00
|
|
|
export GOBIN=${PWD}/bin
|
2014-05-22 14:37:19 -04:00
|
|
|
export GOPATH=${PWD}/gopath
|
2015-03-27 09:23:31 +03:00
|
|
|
export CGO_ENABLED=0
|
2014-03-04 16:36:05 -08:00
|
|
|
|
2015-03-27 09:23:31 +03:00
|
|
|
go build -a -installsuffix cgo -o bin/cloudinit-x86_64 ${REPO_PATH}
|
|
|
|
GOARCH=386 go build -a -installsuffix cgo -o bin/cloudinit-x86_32 ${REPO_PATH}
|