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