Fix the scripts to optionally skip prompts and also return successfully no matter what.

This commit is contained in:
Brendan Burns 2015-03-27 13:53:26 -07:00
parent 1aa2b97792
commit 6fd376a04f

View File

@ -24,6 +24,8 @@ source "${KUBE_ROOT}/cluster/common.sh"
NODE_INSTANCE_PREFIX="${INSTANCE_PREFIX}-minion"
KUBE_PROMPT_FOR_UPDATE=y
# Verify prereqs
function verify-prereqs {
local cmd
@ -43,8 +45,11 @@ function verify-prereqs {
fi
done
# update and install components as needed
gcloud components update preview
gcloud components update
if [[ "${KUBE_PROMPT_FOR_UPDATE}" != "y" ]]; then
gcloud_prompt="-q"
fi
gcloud ${gcloud_prompt:-} components update preview || true
gcloud ${gcloud_prompt:-} components update || true
}
# Create a temp dir that'll be deleted at the end of this bash session.