#!/bin/sh
rm -rf consul-env
mkdir consul-env
GOPATH=`pwd`/consul-env
export GOPATH
( mkdir -p $GOPATH/src/github.com/hashicorp
  cd $GOPATH/src/github.com/hashicorp
  git clone https://github.com/hashicorp/envconsul.git
)
( cd $GOPATH
  go get -v -d ./...
)
tar cvf - --exclude .git consul-env | xz -9 >consul-env-`date '+%Y%m%d'`.tar.xz
rm -rf consul-env
