From: Ben Soares Date: Mon, 17 Feb 2020 16:35:05 +0000 (+0000) Subject: JAL-3252 download-jres.sh helper script for keeping JREs for all platforms up to... X-Git-Tag: Develop-2_11_2_0-d20201215~80^2~11 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f87c431823c2681b6b1e71f02b47af32121a35f1;p=jalview.git JAL-3252 download-jres.sh helper script for keeping JREs for all platforms up to date changed to create .zip files for getdown OTA updates --- diff --git a/utils/download_jres.sh b/utils/download_jres.sh index 8b8abc3..5bfc26d 100755 --- a/utils/download_jres.sh +++ b/utils/download_jres.sh @@ -20,6 +20,8 @@ VENDOR=adoptopenjdk IMAGE_TYPE=jre STRIP_MAC_APP_BUNDLING=false +CREATE_ARCHIVES="zip tgz" +# need zip with top-level jre dir for getdown updates. need tgz without top-level jre dir for install4j bundling RM=/bin/rm @@ -73,10 +75,33 @@ for FEATURE_VERSION in 8 11; do exit 1 fi $RM "${TARFILE}" - echo "Creating .tar.gz for install4j bundling and updates" - TGZDIR=tgz - mkdir -p "${TGZDIR}" - tar -C "${JREDIR}" -zcf "${TGZDIR}/${NAME}.tar.gz" . + if [ \! -z "$CREATE_ARCHIVES" ]; then + for CREATEARCHIVE in ${CREATE_ARCHIVES}; do + ARCHIVEDIR=$CREATEARCHIVE + case $CREATEARCHIVE in + zip) + EXT=${CREATEARCHIVE} + echo "Creating ${NAME}.${EXT} for getdown updates" + [ \! -d ${ARCHIVEDIR} ] && mkdir -p "${ARCHIVEDIR}" + ABSARCHIVEDIR="${PWD}/$ARCHIVEDIR" + ZIPFILE="${ABSARCHIVEDIR}/${NAME}.${CREATEARCHIVE}" + [ -e "${ZIPFILE}" ] && $RM "${ZIPFILE}" + cd ${NAME} + zip -X -r "${ZIPFILE}" "${IMAGE_TYPE}" + cd - + ;; + tgz) + EXT=tar.gz + echo "Creating ${NAME}.${EXT} for install4j bundling" + [ \! -d ${ARCHIVEDIR} ] && mkdir -p "${ARCHIVEDIR}" + tar -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" . + ;; + *) + echo "Archiving as '${CREATEARCHIVE}' file not supported" + ;; + esac + done + fi done done done