JAL-4064 JAL-4054 Corrected the tgz top-level dir from './Contents' to 'Contents...
authorBen Soares <b.soares@dundee.ac.uk>
Wed, 22 Feb 2023 14:04:03 +0000 (14:04 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Wed, 22 Feb 2023 14:04:03 +0000 (14:04 +0000)
utils/download_jres.sh

index c1a5a0d..5b8b30d 100755 (executable)
@@ -147,7 +147,12 @@ for FEATURE_VERSION in 8 11 17; do
             EXT=tar.gz
             echo "Creating ${NAME}.${EXT} for install4j bundling"
             [ \! -d ${ARCHIVEDIR} ] && mkdir -p "${ARCHIVEDIR}"
-            $TAR -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" .
+            if [ x$OS = xmac ]; then
+              # install4j requires top level folder of "Contents" NOT "./Contents"
+              $TAR -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" Contents
+            else
+              $TAR -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" .
+            fi
             # make symbolic link with _ instead of - for install4j9
             NEWNAME=${NAME//-/_}
             echo "Linking from ${NEWNAME}.${EXT} for install4j9"