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