From d366e76ee7c0c443f7cdc3f4be6926dd53818568 Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Fri, 2 Apr 2021 15:50:18 +0200 Subject: [PATCH] add support for ibm JVMs --- .ci/load/scripts/fetch_sdk.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.ci/load/scripts/fetch_sdk.sh b/.ci/load/scripts/fetch_sdk.sh index 5c5c0252d6..059de2e070 100755 --- a/.ci/load/scripts/fetch_sdk.sh +++ b/.ci/load/scripts/fetch_sdk.sh @@ -65,16 +65,27 @@ JDK_ARCHIVE="${JDK_FOLDER}/${SDK_FILENAME}" if [[ ! -f "${JDK_ARCHIVE}" ]] then curl -s -o "${JDK_ARCHIVE}" "${SDK_URL}" - if [ "${JDK_ARCHIVE: -4}" == ".zip" ] - then + case "${JDK_ARCHIVE}" in + *.zip) unzip -qq "${JDK_ARCHIVE}" -d "${JDK_FOLDER}" - else + ;; + *.tar.gz) tar xfz "${JDK_ARCHIVE}" -C "${JDK_FOLDER}" - fi + ;; + *.bin) + # assume IBM executable JVM installer + INSTALLER_PROPERTIES=${JDK_FOLDER}/response.properties + echo "INSTALLER_UI=silent" > ${INSTALLER_PROPERTIES} + echo "USER_INSTALL_DIR=${JDK_FOLDER}/${JDK_ID}" >> ${INSTALLER_PROPERTIES} + echo "LICENSE_ACCEPTED=TRUE" >> ${INSTALLER_PROPERTIES} + mkdir -p "${JDK_FOLDER}/${JDK_ID}" + chmod +x ${JDK_ARCHIVE} + ${JDK_ARCHIVE} -i silent -f ${INSTALLER_PROPERTIES} + ;; + esac fi -set -x # JDK is stored within a sub-folder SUB_FOLDER="$(find "${JDK_FOLDER}" -maxdepth 1 -mindepth 1 -type d)"