From 584496d2c4cccf5f31f8f98454b2416d14c6da36 Mon Sep 17 00:00:00 2001 From: gmarek Date: Tue, 26 May 2015 14:27:36 +0200 Subject: [PATCH] Small fixes to get-kube.sh --- cluster/get-kube.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cluster/get-kube.sh b/cluster/get-kube.sh index bc17042a843..bd638243918 100755 --- a/cluster/get-kube.sh +++ b/cluster/get-kube.sh @@ -49,7 +49,9 @@ function create_cluster { cd kubernetes ./cluster/kube-up.sh echo "Kubernetes binaries at ${PWD}/cluster/" - echo "You may want to add this directory to your PATH in \$HOME/.profile" + if [[ ":$PATH:" != *":${PWD}/cluster:"* ]]; then + echo "You may want to add this directory to your PATH in \$HOME/.profile" + fi echo "Installation successful!" ) @@ -66,6 +68,9 @@ function get_latest_version_number { wget -qO- ${latest_url} elif [[ $(which curl) ]]; then curl -Ss ${latest_url} + else + echo "Couldn't find curl or wget. Bailing out." + exit 4 fi } @@ -100,7 +105,6 @@ fi file=kubernetes.tar.gz - echo "Downloading kubernetes release ${release} to ${PWD}/kubernetes.tar.gz" if [[ -n "${KUBERNETES_SKIP_CONFIRM-}" ]]; then echo "Is this ok? [Y]/n"