Merge pull request #6168 from brendandburns/docs

Auto-install gcloud and needed components, if necessary
This commit is contained in:
Robert Bailey
2015-03-31 13:55:46 -07:00
2 changed files with 30 additions and 8 deletions

View File

@@ -31,9 +31,13 @@ function verify-prereqs {
local cmd
for cmd in gcloud gsutil; do
if ! which "${cmd}" >/dev/null; then
echo "Can't find ${cmd} in PATH. Do you wish to install the Google Cloud SDK? [Y/n]"
local resp
read resp
if [[ "${KUBE_PROMPT_FOR_UPDATE" == "y" ]]; then
echo "Can't find ${cmd} in PATH. Do you wish to install the Google Cloud SDK? [Y/n]"
read resp
else
resp="y"
fi
if [[ "${resp}" != "n" && "${resp}" != "N" ]]; then
curl https://sdk.cloud.google.com | bash
fi