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