#!/bin/sh
rm -rf gogs
mkdir gogs
export GOPATH=`pwd`/gogs
go get -v -d -tags "sqlite" github.com/gogs/gogs
( cd $GOPATH/src/github.com/gogs
  go get -v -d -u -tags "sqlite" ./...
)
tar cf - --exclude .git --exclude .hg --exclude .svn gogs | xz -9 >gogs-`date '+%Y%m%d'`.tar.xz
rm -rf gogs
