2014-03-05 04:36:05 +04:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2015-03-28 20:08:30 +03:00
|
|
|
ORG_PATH="github.com/vtolstov"
|
|
|
|
REPO_PATH="${ORG_PATH}/cloudinit"
|
2014-05-10 12:42:57 +04:00
|
|
|
|
2014-05-22 22:37:19 +04:00
|
|
|
if [ ! -h gopath/src/${REPO_PATH} ]; then
|
|
|
|
mkdir -p gopath/src/${ORG_PATH}
|
2015-03-28 20:04:09 +03:00
|
|
|
ln -s ../../../.. gopath/src/${REPO_PATH} || echo "exit 255"
|
2014-05-22 22:37:19 +04:00
|
|
|
fi
|
|
|
|
|
2014-03-05 04:36:05 +04:00
|
|
|
export GOBIN=${PWD}/bin
|
2015-03-28 20:04:09 +03:00
|
|
|
export GOPATH=${PWD}/third_party
|
2015-03-27 09:23:31 +03:00
|
|
|
export CGO_ENABLED=0
|
2014-03-05 04:36:05 +04:00
|
|
|
|
2015-03-28 20:04:09 +03:00
|
|
|
for os in linux freebsd; do
|
|
|
|
GOOS=${os} go build -a -installsuffix cgo -o bin/cloudinit-linux-x86_64 ${REPO_PATH}
|
|
|
|
GOOS=${os} GOARCH=386 go build -a -installsuffix cgo -o bin/cloudinit-linux-x86_32 ${REPO_PATH}
|
|
|
|
done
|