cloudinit/build

19 lines
548 B
Plaintext
Raw Normal View History

#!/bin/bash -ex
2014-03-04 16:36:05 -08:00
ORG_PATH="github.com/vtolstov"
REPO_PATH="${ORG_PATH}/cloudinit"
2014-05-10 01:42:57 -07:00
2014-03-04 16:36:05 -08:00
export GOBIN=${PWD}/bin
export GOPATH=${PWD}/third_party
export CGO_ENABLED=0
2014-03-04 16:36:05 -08:00
if [ ! -h $GOPATH/src/${REPO_PATH} ]; then
mkdir -p $GOPATH/src/${ORG_PATH}
ln -s ../../../.. $GOPATH/src/${REPO_PATH} || echo "exit 255"
fi
for os in linux freebsd; do
GOOS=${os} go build -x -a -installsuffix cgo -o bin/cloudinit-linux-x86_64 ${REPO_PATH}
GOOS=${os} GOARCH=386 go build -x -a -installsuffix cgo -o bin/cloudinit-linux-x86_32 ${REPO_PATH}
done