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