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"