Skip to content

Commit

Permalink
container require modern bash and getopt
Browse files Browse the repository at this point in the history
  • Loading branch information
skoranda committed Apr 12, 2023
1 parent 3f3f646 commit 86733af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions container/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,19 @@ function main() {
local repository
local suffix

# Require bash version 4 or higher.
if [[ ! "${BASH_VERSINFO:-0}" -ge 4 ]]; then
err "ERROR: Bash version must be 4 or greater"
exit 1
fi

# Require getopt version 2.32 or greater.
getopt_version=$(/usr/bin/getopt --version | cut -d' ' -f4 | cut -c1-4 | tr -d .)
if [[ ! "${getopt_version:-0}" -ge 232 ]]; then
err "ERROR: getopt version must be 2.32 or greater"
exit 1
fi

declare -a docker_build_flags=()

gnu_getopt_out=$(/usr/bin/getopt \
Expand Down

0 comments on commit 86733af

Please sign in to comment.