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