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