Fixup bash version check

This commit is contained in:
Steven A. Broderick Elias
2023-09-11 17:34:31 -04:00
committed by Kenneth Bingham
parent 2aaf2b2dda
commit feba3e8680
@@ -8,7 +8,7 @@ checkBashVersion() {
if (( "${BASH_VERSION%%.*}" < 4 )); then
echo "This script requires Bash major version 4 or greater."
echo "Detected version: $BASH_VERSION"
if [[ "$DETECTED_OS" == "macOS" ]]; then
if [[ ${OSTYPE:-} =~ [Dd]arwin ]]; then
echo -e "\nOn macOS, you can install bash with Homebrew:"
echo "brew install bash"
echo -e "\nThen run:"
@@ -315,6 +315,7 @@ check_command() {
}
main(){
checkBashVersion >&2
MINIZITI_DEBUG=0
# require commands
declare -a BINS=(awk grep helm jq minikube nslookup pgrep sed xargs)
@@ -349,8 +350,6 @@ main(){
DETECTED_OS="$(detectOs)"
: "${DEBUG_MINIKUBE_TUNNEL:=0}" # set env = 1 to trigger the minikube tunnel probe
checkBashVersion >&2
while (( $# )); do
case "$1" in
start) START_MINIZITI=1