#!/bin/sh
rm -rf serfdom
mkdir serfdom
GOPATH=`pwd`/serfdom
export GOPATH
( mkdir -p $GOPATH/src/github.com/hashicorp
  cd $GOPATH/src/github.com/hashicorp
  git clone https://github.com/hashicorp/serf.git
)
( cd $GOPATH
  go get -v -d ./...
)
tar cvf - --exclude .git serfdom | gzip -9 >serfdom-`date '+%Y%m%d'`.tar.gz
rm -rf serfdom
