mirror of https://github.com/kubernetes/kops.git
nodeup: Simplify the template by removing split-commas
This commit is contained in:
parent
633a9b757b
commit
4e008ffe7a
|
@ -74,7 +74,7 @@ download-or-bust() {
|
||||||
local -r file="$1"
|
local -r file="$1"
|
||||||
local -r hash="$2"
|
local -r hash="$2"
|
||||||
local -a urls
|
local -a urls
|
||||||
mapfile -t urls < <(split-commas "$3")
|
IFS=, read -r -a urls <<< "$3"
|
||||||
|
|
||||||
if [[ -f "${file}" ]]; then
|
if [[ -f "${file}" ]]; then
|
||||||
if ! validate-hash "${file}" "${hash}"; then
|
if ! validate-hash "${file}" "${hash}"; then
|
||||||
|
@ -125,10 +125,6 @@ validate-hash() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function split-commas() {
|
|
||||||
echo "$1" | tr "," "\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
function download-release() {
|
function download-release() {
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
x86_64*|i?86_64*|amd64*)
|
x86_64*|i?86_64*|amd64*)
|
||||||
|
|
Loading…
Reference in New Issue