#!/bin/sh
rm -rf linkerd2
mkdir linkerd2
export GOPATH=`pwd`/linkerd2
mkdir -p $GOPATH/src/github.com/linkerd
git clone https://github.com/linkerd/linkerd2.git $GOPATH/src/github.com/linkerd/linkerd2
( cd $GOPATH/src/github.com/linkerd/linkerd2
  dep ensure
)
tar cf - --exclude .git linkerd2 | xz -9 >linkerd2-`date '+%Y%m%d'`.tar.xz
rm -rf linkerd2
