-
-
Save zzamboni/38f04d427290bc4f2787 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#first make sure go, git and mercurial are installed. | |
if [[ -z $(which git) ]]; then | |
echo "Git must be installed" | |
exit 1 | |
fi | |
if [[ -z $(which hg) ]]; then | |
echo "mercurial must be installed" | |
exit 1 | |
fi | |
if [[ -z $(which go) ]]; then | |
echo "Go must be installed" | |
exit 1 | |
fi | |
if [[ -z $(which make) ]]; then | |
echo "make must be installed" | |
exit 1 | |
fi | |
if [[ -z "$GOPATH" ]]; then | |
export GOPATH=$HOME/go | |
echo "Setting GOPATH to $GOPATH" | |
mkdir -p $GOPATH | |
else | |
echo "Using existing GOPATH ($GOPATH)" | |
fi | |
export PATH=$PATH:$GOPATH/bin | |
echo "Installing GOX" | |
go get -u github.com/mitchellh/gox | |
go install github.com/mitchellh/gox | |
echo "Get the terraform source code" | |
mkdir -p ${GOPATH}/src/github.com/hashicorp/ | |
cd ${GOPATH}/src/github.com/hashicorp/ | |
git clone https://github.com/hashicorp/terraform.git terraform | |
cd terraform | |
echo "Doing an initial build of plain Terraform" | |
make updatedeps || exit 1 | |
make || exit 1 | |
make dev || exit 1 | |
echo "Add the openstack branch" | |
cd ${GOPATH}/src/github.com/hashicorp/terraform/ | |
git remote add openstack https://github.com/haklop/terraform.git | |
git fetch openstack | |
git checkout -b openstack-provider openstack/openstack-provider | |
echo "Get gophercloud release version 0.1.1" | |
go get github.com/rackspace/gophercloud | |
cd ${GOPATH}/src/github.com/rackspace/gophercloud/ | |
git branch -a | |
git checkout release/v0.1.1 | |
echo "Install Golang Pretty dependency for gophercloud" | |
go get github.com/tonnerre/golang-pretty | |
go install github.com/tonnerre/golang-pretty | |
echo "Install gophercloud" | |
go install github.com/rackspace/gophercloud | |
echo "Install development release of terraform" | |
cd ${GOPATH}/src/github.com/hashicorp/terraform/ | |
make dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment