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