Fix bugs in cluster/get-kube-local.sh

- default the release to the value of latest_release instead of
   the string 'latest_release'
 - use curl -O when retrieving kubectl to write output to disk instead
   of to the screen
This commit is contained in:
Maru Newby
2015-12-18 18:13:46 +00:00
parent cd8dfe70d9
commit e1c11c7d9e

View File

@@ -114,7 +114,7 @@ function get_latest_version_number {
}
latest_release=$(get_latest_version_number)
release=${KUBE_VERSION:-latest_release}
release=${KUBE_VERSION:-${latest_release}}
uname=$(uname)
if [[ "${uname}" == "Darwin" ]]; then
@@ -151,7 +151,7 @@ if [[ $(ls . | grep ^kubectl$ | wc -l) -lt 1 ]]; then
if [[ $(which wget) ]]; then
run "wget ${kubectl_url}"
elif [[ $(which curl) ]]; then
run "curl -L ${kubectl_url}"
run "curl -OL ${kubectl_url}"
else
echo_red "Couldn't find curl or wget. Bailing out."
exit 1