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