mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Ensure bash version at least 5.x
Co-authored-by: Stephen Augustus <justaugustus@users.noreply.github.com> Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
6a161bf6d3
commit
feecef7795
@ -50,6 +50,7 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
|
|||||||
source "${KUBE_ROOT}/hack/lib/logging.sh"
|
source "${KUBE_ROOT}/hack/lib/logging.sh"
|
||||||
|
|
||||||
kube::log::install_errexit
|
kube::log::install_errexit
|
||||||
|
kube::util::ensure-bash-version
|
||||||
|
|
||||||
source "${KUBE_ROOT}/hack/lib/version.sh"
|
source "${KUBE_ROOT}/hack/lib/version.sh"
|
||||||
source "${KUBE_ROOT}/hack/lib/golang.sh"
|
source "${KUBE_ROOT}/hack/lib/golang.sh"
|
||||||
|
@ -729,6 +729,17 @@ function kube::util::ensure_dockerized {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# kube::util::ensure-bash-version
|
||||||
|
# Check if we are using a supported bash version
|
||||||
|
#
|
||||||
|
function kube::util::ensure-bash-version {
|
||||||
|
# shellcheck disable=SC2004
|
||||||
|
if ((${BASH_VERSINFO[0]}<5)); then
|
||||||
|
echo "ERROR: This script requires a minimum bash version of 5.0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# kube::util::ensure-gnu-sed
|
# kube::util::ensure-gnu-sed
|
||||||
# Determines which sed binary is gnu-sed on linux/darwin
|
# Determines which sed binary is gnu-sed on linux/darwin
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user