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