Skip to content

Commit

Permalink
ensure jq exists before executing the script
Browse files Browse the repository at this point in the history
  • Loading branch information
danielyahn authored and wendigo committed Dec 5, 2023
1 parent 7a7ac6c commit d3fbd21
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/docker/build.sh
Expand Up @@ -47,6 +47,13 @@ while getopts ":a:h:r:j:" o; do
done
shift $((OPTIND - 1))

function check_environment() {
if ! command -v jq &> /dev/null; then
echo >&2 "Please install jq"
exit 1
fi
}

function temurin_jdk_link() {
local JDK_VERSION="${1}"
local ARCH="${2}"
Expand Down Expand Up @@ -79,6 +86,8 @@ function temurin_jdk_link() {
esac
}

check_environment

if [ -n "$TRINO_VERSION" ]; then
echo "🎣 Downloading server and client artifacts for release version ${TRINO_VERSION}"
for artifactId in io.trino:trino-server:"${TRINO_VERSION}":tar.gz io.trino:trino-cli:"${TRINO_VERSION}":jar:executable; do
Expand Down

0 comments on commit d3fbd21

Please sign in to comment.