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
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