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