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