mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
hack/lib/util.sh: add double quotes.
Also move one test to use bash [[ insted of [.
This commit is contained in:
parent
73b5f1b78c
commit
39f4763afe
@ -30,13 +30,13 @@ kube::util::wait_for_url() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local i
|
local i
|
||||||
for i in $(seq 1 $times); do
|
for i in $(seq 1 "$times"); do
|
||||||
local out
|
local out
|
||||||
if out=$(curl --max-time 1 -gkfs $url 2>/dev/null); then
|
if out=$(curl --max-time 1 -gkfs "$url" 2>/dev/null); then
|
||||||
kube::log::status "On try ${i}, ${prefix}: ${out}"
|
kube::log::status "On try ${i}, ${prefix}: ${out}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
sleep ${wait}
|
sleep "${wait}"
|
||||||
done
|
done
|
||||||
kube::log::error "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each"
|
kube::log::error "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each"
|
||||||
return 1
|
return 1
|
||||||
@ -209,7 +209,7 @@ kube::util::gen-docs() {
|
|||||||
# Puts a placeholder for every generated doc. This makes the link checker work.
|
# Puts a placeholder for every generated doc. This makes the link checker work.
|
||||||
kube::util::set-placeholder-gen-docs() {
|
kube::util::set-placeholder-gen-docs() {
|
||||||
local list_file="${KUBE_ROOT}/docs/.generated_docs"
|
local list_file="${KUBE_ROOT}/docs/.generated_docs"
|
||||||
if [ -e ${list_file} ]; then
|
if [[ -e "${list_file}" ]]; then
|
||||||
# remove all of the old docs; we don't want to check them in.
|
# remove all of the old docs; we don't want to check them in.
|
||||||
while read file; do
|
while read file; do
|
||||||
if [[ "${list_file}" != "${KUBE_ROOT}/${file}" ]]; then
|
if [[ "${list_file}" != "${KUBE_ROOT}/${file}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user