mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Use curl -f in cluster/get-kube.sh
This commit is contained in:
parent
f6b313b1da
commit
7436b315c4
@ -117,7 +117,7 @@ function download_tarball() {
|
|||||||
url="${DOWNLOAD_URL_PREFIX}/${file}"
|
url="${DOWNLOAD_URL_PREFIX}/${file}"
|
||||||
mkdir -p "${download_path}"
|
mkdir -p "${download_path}"
|
||||||
if [[ $(which curl) ]]; then
|
if [[ $(which curl) ]]; then
|
||||||
curl -L --retry 3 --keepalive-time 2 "${url}" -o "${download_path}/${file}"
|
curl -fL --retry 3 --keepalive-time 2 "${url}" -o "${download_path}/${file}"
|
||||||
elif [[ $(which wget) ]]; then
|
elif [[ $(which wget) ]]; then
|
||||||
wget "${url}" -O "${download_path}/${file}"
|
wget "${url}" -O "${download_path}/${file}"
|
||||||
else
|
else
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
# Usage:
|
# Usage:
|
||||||
# wget -q -O - https://get.k8s.io | bash
|
# wget -q -O - https://get.k8s.io | bash
|
||||||
# or
|
# or
|
||||||
# curl -sS https://get.k8s.io | bash
|
# curl -fsSL https://get.k8s.io | bash
|
||||||
#
|
#
|
||||||
# Advanced options
|
# Advanced options
|
||||||
# Set KUBERNETES_PROVIDER to choose between different providers:
|
# Set KUBERNETES_PROVIDER to choose between different providers:
|
||||||
@ -115,7 +115,7 @@ function get_latest_version_number {
|
|||||||
if [[ $(which wget) ]]; then
|
if [[ $(which wget) ]]; then
|
||||||
wget -qO- "${latest_url}"
|
wget -qO- "${latest_url}"
|
||||||
elif [[ $(which curl) ]]; then
|
elif [[ $(which curl) ]]; then
|
||||||
curl -Ssf --retry 3 --keepalive-time 2 "${latest_url}"
|
curl -sSfL --retry 3 --keepalive-time 2 "${latest_url}"
|
||||||
else
|
else
|
||||||
echo "Couldn't find curl or wget. Bailing out." >&2
|
echo "Couldn't find curl or wget. Bailing out." >&2
|
||||||
exit 4
|
exit 4
|
||||||
@ -203,7 +203,7 @@ fi
|
|||||||
|
|
||||||
if "${need_download}"; then
|
if "${need_download}"; then
|
||||||
if [[ $(which curl) ]]; then
|
if [[ $(which curl) ]]; then
|
||||||
curl -L --retry 3 --keepalive-time 2 "${release_url}" -o "${file}"
|
curl -fL --retry 3 --keepalive-time 2 "${release_url}" -o "${file}"
|
||||||
elif [[ $(which wget) ]]; then
|
elif [[ $(which wget) ]]; then
|
||||||
wget "${release_url}"
|
wget "${release_url}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user