From 50e0ad6e4875ed662ed49272c149c0f14b04f4ae Mon Sep 17 00:00:00 2001 From: Gaurav Agarwal Date: Fri, 9 Aug 2019 15:33:34 +0530 Subject: [PATCH] Adding check. --- code-samples/11-kubernetes/build-image.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code-samples/11-kubernetes/build-image.sh b/code-samples/11-kubernetes/build-image.sh index 07317ff..bbfa5b4 100755 --- a/code-samples/11-kubernetes/build-image.sh +++ b/code-samples/11-kubernetes/build-image.sh @@ -7,9 +7,11 @@ mkdir -p ~/.docker cp docker-config.json ~/.docker/config.json echo "Fetching kubernetes source..." -mkdir -p ~/.go/src/k8s.io/kubernetes +mkdir -p ~/.go/src/k8s.io export GOPATH=$HOME/.go -git clone https://github.com/kubernetes/kubernetes.git ~/.go/src/k8s.io/kubernetes +if [ ! -d ~/.go/src/k8s.io/kubernetes ]; then + git clone https://github.com/kubernetes/kubernetes.git ~/.go/src/k8s.io/kubernetes +fi echo "Creating kind cluster..." # kind delete cluster