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