mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
bash: compare numbers numerically, not lexically
Thanks, bash, for supporting < and > and making them NOT mean the obvious thing. [[ 2 < 10 ]] is false (( 2 < 10 )) is true
This commit is contained in:
parent
bbbbfcd967
commit
fe96e5704f
@ -130,7 +130,7 @@ kube::log::usage_from_stdin() {
|
|||||||
# Print out some info that isn't a top level status line
|
# Print out some info that isn't a top level status line
|
||||||
kube::log::info() {
|
kube::log::info() {
|
||||||
local V="${V:-0}"
|
local V="${V:-0}"
|
||||||
if [[ ${KUBE_VERBOSE} < ${V} ]]; then
|
if (( KUBE_VERBOSE < V )); then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ kube::log::info_from_stdin() {
|
|||||||
# Print a status line. Formatted to show up in a stream of output.
|
# Print a status line. Formatted to show up in a stream of output.
|
||||||
kube::log::status() {
|
kube::log::status() {
|
||||||
local V="${V:-0}"
|
local V="${V:-0}"
|
||||||
if [[ ${KUBE_VERBOSE} < ${V} ]]; then
|
if (( KUBE_VERBOSE < V )); then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user