rm -rf dex
mkdir dex
cd dex
export GOPATH=`pwd`
mkdir -p src/github.com/dexidp
git clone --depth 1 https://github.com/dexidp/dex.git src/github.com/dexidp/dex
( cd $GOPATH/src/github.com/dexidp/dex
  go get -v -d
)
cd ..
tar -c -v -f- --exclude .git dex | xz -9 >dex-`date '+%Y%m%d'`.tar.xz
rm -rf dex
