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