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