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