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