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