Skip to content

Commit

Permalink
Bump Java from 21.0.1+12 to 21.0.2+13
Browse files Browse the repository at this point in the history
  • Loading branch information
jacodg committed Feb 9, 2024
1 parent 17c5357 commit 2c71936
Show file tree
Hide file tree
Showing 18 changed files with 160 additions and 157 deletions.
16 changes: 8 additions & 8 deletions ant.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ if not exist "%~dp0download\" (
if not exist "%~dp0build\tmp\build\" (
mkdir "%~dp0build\tmp\build"
)
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip" (
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip" (
echo "In case of errors %DOWNLOAD_HELP%"
curl -f -o "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip.tmp" -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip
curl -f -o "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip.tmp" -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip.tmp" "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip"
move "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip.tmp" "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip"
)
if not exist "%~dp0build\jdk-21.0.1+12\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip" -C "%~dp0build\tmp\build"
if not exist "%~dp0build\jdk-21.0.2+13\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0build\tmp\build\jdk-21.0.1+12" "%~dp0build\jdk-21.0.1+12"
move "%~dp0build\tmp\build\jdk-21.0.2+13" "%~dp0build\jdk-21.0.2+13"
)
set DOWNLOAD_HELP=download https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\apache-ant-1.10.10-bin.zip" (
Expand Down Expand Up @@ -68,7 +68,7 @@ if not exist "%~dp0build\apache-ant-1.10.10\lib\rhino-1.7.14.jar" (
set JDK_8_DIR=%~dp0%build\jdk8u392-b08
set JDK_11_DIR=%~dp0%build\jdk-11.0.21+9
set JDK_17_DIR=%~dp0%build\jdk-17.0.8+7
set JDK_21_DIR=%~dp0%build\jdk-21.0.1+12
set JDK_21_DIR=%~dp0%build\jdk-21.0.2+13
if not exist "%JDK_8_DIR%" (
set RUN_INSTALL=true
)
Expand Down
20 changes: 10 additions & 10 deletions ant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ fi
if [[ ! -d "${FR_DIR}build/tmp/build" ]]; then
mkdir -p "${FR_DIR}build/tmp/build"
fi
ZIP=OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz
DIR=build/jdk-21.0.1+12
ZIP=OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz
DIR=build/jdk-21.0.2+13
SUB=
if [[ "$OSTYPE" == "darwin"* ]]; then
ZIP=OpenJDK21U-jdk_x64_mac_hotspot_21.0.1_12.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_mac_hotspot_21.0.1_12.tar.gz
ZIP=OpenJDK21U-jdk_x64_mac_hotspot_21.0.2_13.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_mac_hotspot_21.0.2_13.tar.gz
SUB=Contents/Home
fi
DOWNLOAD_HELP="download ${URL} manually, move it to ${FR_DIR}download and restart this script"
Expand All @@ -38,7 +38,8 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
mv "${FR_DIR}build/tmp/${DIR}/${SUB}" "${FR_DIR}${DIR}"
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -62,7 +63,7 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
mv "${FR_DIR}build/tmp/${DIR}/${SUB}" "${FR_DIR}${DIR}"
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -86,7 +87,7 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
mv "${FR_DIR}build/tmp/${DIR}/${SUB}" "${FR_DIR}${DIR}"
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -95,7 +96,7 @@ fi
JDK_8_DIR="${FR_DIR}build/jdk8u392-b08"
JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.2+13"
if [[ ! -d "${JDK_8_DIR}" ]]; then
RUN_INSTALL="true"
fi
Expand All @@ -106,7 +107,6 @@ if [[ ! -d "${JDK_17_DIR}" ]]; then
RUN_INSTALL="true"
fi
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
if [[ "$RUN_INSTALL" == "true" ]]; then
Expand Down
14 changes: 8 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
<property name="jdk.17.url.mac" value="https://github.com/adoptium/temurin17-binaries/releases/download/${jdk.17.dir.sub}/${jdk.17.zip.mac}"/>

<property name="jdk.21.version.minor" value="0"/><!-- https://adoptium.net/temurin/releases/?os=any&version=21 -->
<property name="jdk.21.version.patch" value="1"/>
<property name="jdk.21.version.plus" value="12"/>
<property name="jdk.21.version.patch" value="2"/>
<property name="jdk.21.version.plus" value="13"/>
<property name="jdk.21.dir.sub" value="jdk-21.${jdk.21.version.minor}.${jdk.21.version.patch}+${jdk.21.version.plus}"/>
<property name="jdk.21.dir" value="build/${jdk.21.dir.sub}"/>
<property name="jdk.21.zip.win" value="OpenJDK21U-jdk_x64_windows_hotspot_21.${jdk.21.version.minor}.${jdk.21.version.patch}_${jdk.21.version.plus}.zip"/>
Expand All @@ -153,6 +153,7 @@
<property name="fr.jdk.url.win" value="${jdk.21.url.win}"/>
<property name="fr.jdk.url.lin" value="${jdk.21.url.lin}"/>
<property name="fr.jdk.url.mac" value="${jdk.21.url.mac}"/>
<property name="jdk.lib.jspawnhelper" value="lib/jspawnhelper"/><!-- chmod +x to prevent "error=13, Permission denied" since Java 17 for tasks like java and chmod, see also https://askubuntu.com/questions/1480995/permission-denied-trying-to-start-a-new-process-from-a-java-application-as-root -->
<property name="jdk.sub.mac" value="Contents/Home"/>

<property name="ant.version." value="1.10.10"/><!-- extra . because ant.version is a build-in property -->
Expand Down Expand Up @@ -415,6 +416,7 @@
<loadresource property="jdk.11.dir.windows"><propertyresource name="jdk.11.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
<loadresource property="jdk.17.dir.windows"><propertyresource name="jdk.17.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
<loadresource property="jdk.21.dir.windows"><propertyresource name="jdk.21.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
<loadresource property="fr.jdk.dir.windows"><propertyresource name="fr.jdk.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
<loadresource property="ant.dir.windows"><propertyresource name="ant.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
<loadresource property="rhino.dir.windows"><propertyresource name="rhino.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
<loadresource property="maven.dir.windows"><propertyresource name="maven.dir"/><filterchain><tokenfilter><filetokenizer/><replacestring from="/" to="\"/></tokenfilter></filterchain></loadresource>
Expand Down Expand Up @@ -871,7 +873,7 @@
<cutdirsmapper dirs="3" if:true="${os.mac}"/>
</untar>
<delete file="build/${jdk.tar}" unless:set="jdk.dir.available" unless:true="${os.windows}"/>
<chmod dir="${jdk.dir}/bin" includes="*" perm="+x" unless:set="jdk.dir.available" unless:true="${os.windows}"/>
<chmod dir="${jdk.dir}" includes="bin/*,${jdk.lib.jspawnhelper}" perm="+x" unless:set="jdk.dir.available" unless:true="${os.windows}"/>
<antcall target="cacerts"/>
</target>

Expand Down Expand Up @@ -1050,7 +1052,7 @@ fi
if [[ ! -d "$${FR_DIR}build/tmp/build" ]]; then
mkdir -p "$${FR_DIR}build/tmp/build"
fi</echo>
<antcall target="generate.sh.download.unzip"><param name="zip" value="${fr.jdk.zip.lin}"/><param name="zip.mac" value="${fr.jdk.zip.mac}"/><param name="url" value="${fr.jdk.url.lin}"/><param name="url.mac" value="${fr.jdk.url.mac}"/><param name="dir" value="${fr.jdk.dir}"/><param name="sub.mac" value="${jdk.sub.mac}"/><param name="run.install" value="true" if:set="mvn.or.env"/></antcall>
<antcall target="generate.sh.download.unzip"><param name="zip" value="${fr.jdk.zip.lin}"/><param name="zip.mac" value="${fr.jdk.zip.mac}"/><param name="url" value="${fr.jdk.url.lin}"/><param name="url.mac" value="${fr.jdk.url.mac}"/><param name="dir" value="${fr.jdk.dir}"/><param name="sub.mac" value="${jdk.sub.mac}"/><param name="run.chmod.jspawnhelper" value="true"/><param name="run.install" value="true" if:set="mvn.or.env"/></antcall>
<antcall target="generate.sh.download.unzip"><param name="zip" value="${ant.gz}"/><param name="url" value="${ant.gz.url}"/><param name="dir" value="${ant.dir}"/></antcall>
<antcall target="generate.sh.download.unzip"><param name="zip" value="${rhino.zip}"/><param name="url" value="${rhino.zip.url}"/><param name="dir" value="${rhino.dir}"/></antcall>
<echo file="${filename}.sh" append="true">
Expand Down Expand Up @@ -1094,7 +1096,6 @@ export JAVA_HOME="$${JDK_11_DIR}"</echo>
export JAVA_HOME="$${JDK_17_DIR}"</echo>
<echo file="${filename}.sh" append="true" if:set="fr.use.jdk.21" unless:set="mvn">
export JAVA_HOME="$${JDK_21_DIR}"
chmod +x "$${JDK_21_DIR}/lib/jspawnhelper"<!-- prevent "error=13, Permission denied" since Java 17 for tasks like java and chmod, see also https://askubuntu.com/questions/1480995/permission-denied-trying-to-start-a-new-process-from-a-java-application-as-root -->
</echo>
<echo file="${filename}.sh" append="true" if:set="mvn">
# ${maven.remark.line1}
Expand Down Expand Up @@ -1177,7 +1178,8 @@ if [[ ! -d "$${FR_DIR}$${DIR}/" ]]; then</echo><echo file="${filename}.sh" appen
echo "Please $${DOWNLOAD_HELP}"<!-- when a proxy replaces the content of the zip with an html page saying access is denied curl doesn't notice it and an error occurs when unzipping, hence the user also needs instruction to download manually when unzip fails -->
exit $$retVal
fi
mv "$${FR_DIR}build/tmp/$${DIR}//$${SUB}" "$${FR_DIR}$${DIR}"</echo><echo file="${filename}.sh" append="true" if:true="${run.install}">
mv "$${FR_DIR}build/tmp/$${DIR}/$${SUB}" "$${FR_DIR}$${DIR}"</echo><echo file="${filename}.sh" append="true" if:true="${run.chmod.jspawnhelper}">
chmod +x "$${FR_DIR}$${DIR}/${jdk.lib.jspawnhelper}"</echo><echo file="${filename}.sh" append="true" if:true="${run.install}">
RUN_INSTALL="true"<!-- install cacerts when present --></echo><echo file="${filename}.sh" append="true">
fi</echo>
</target>
Expand Down
16 changes: 8 additions & 8 deletions cmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ if not exist "%~dp0download\" (
if not exist "%~dp0build\tmp\build\" (
mkdir "%~dp0build\tmp\build"
)
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip" (
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip" (
echo "In case of errors %DOWNLOAD_HELP%"
curl -f -o "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip.tmp" -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip
curl -f -o "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip.tmp" -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip.tmp" "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip"
move "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip.tmp" "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip"
)
if not exist "%~dp0build\jdk-21.0.1+12\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip" -C "%~dp0build\tmp\build"
if not exist "%~dp0build\jdk-21.0.2+13\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0build\tmp\build\jdk-21.0.1+12" "%~dp0build\jdk-21.0.1+12"
move "%~dp0build\tmp\build\jdk-21.0.2+13" "%~dp0build\jdk-21.0.2+13"
RUN_INSTALL="true"
)
set DOWNLOAD_HELP=download https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.zip manually, move it to %~dp0download and restart this script
Expand Down Expand Up @@ -69,7 +69,7 @@ if not exist "%~dp0build\apache-ant-1.10.10\lib\rhino-1.7.14.jar" (
set JDK_8_DIR=%~dp0%build\jdk8u392-b08
set JDK_11_DIR=%~dp0%build\jdk-11.0.21+9
set JDK_17_DIR=%~dp0%build\jdk-17.0.8+7
set JDK_21_DIR=%~dp0%build\jdk-21.0.1+12
set JDK_21_DIR=%~dp0%build\jdk-21.0.2+13
if not exist "%JDK_8_DIR%" (
set RUN_INSTALL=true
)
Expand Down
16 changes: 8 additions & 8 deletions env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ if not exist "%~dp0download\" (
if not exist "%~dp0build\tmp\build\" (
mkdir "%~dp0build\tmp\build"
)
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip" (
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip" (
echo "In case of errors %DOWNLOAD_HELP%"
curl -f -o "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip.tmp" -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip
curl -f -o "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip.tmp" -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip.tmp" "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip"
move "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip.tmp" "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip"
)
if not exist "%~dp0build\jdk-21.0.1+12\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.zip" -C "%~dp0build\tmp\build"
if not exist "%~dp0build\jdk-21.0.2+13\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0build\tmp\build\jdk-21.0.1+12" "%~dp0build\jdk-21.0.1+12"
move "%~dp0build\tmp\build\jdk-21.0.2+13" "%~dp0build\jdk-21.0.2+13"
RUN_INSTALL="true"
)
set DOWNLOAD_HELP=download https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.zip manually, move it to %~dp0download and restart this script
Expand Down Expand Up @@ -69,7 +69,7 @@ if not exist "%~dp0build\apache-ant-1.10.10\lib\rhino-1.7.14.jar" (
set JDK_8_DIR=%~dp0%build\jdk8u392-b08
set JDK_11_DIR=%~dp0%build\jdk-11.0.21+9
set JDK_17_DIR=%~dp0%build\jdk-17.0.8+7
set JDK_21_DIR=%~dp0%build\jdk-21.0.1+12
set JDK_21_DIR=%~dp0%build\jdk-21.0.2+13
if not exist "%JDK_8_DIR%" (
set RUN_INSTALL=true
)
Expand Down
20 changes: 10 additions & 10 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ fi
if [[ ! -d "${FR_DIR}build/tmp/build" ]]; then
mkdir -p "${FR_DIR}build/tmp/build"
fi
ZIP=OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz
DIR=build/jdk-21.0.1+12
ZIP=OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz
DIR=build/jdk-21.0.2+13
SUB=
if [[ "$OSTYPE" == "darwin"* ]]; then
ZIP=OpenJDK21U-jdk_x64_mac_hotspot_21.0.1_12.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_mac_hotspot_21.0.1_12.tar.gz
ZIP=OpenJDK21U-jdk_x64_mac_hotspot_21.0.2_13.tar.gz
URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2+13/OpenJDK21U-jdk_x64_mac_hotspot_21.0.2_13.tar.gz
SUB=Contents/Home
fi
DOWNLOAD_HELP="download ${URL} manually, move it to ${FR_DIR}download and restart this script"
Expand All @@ -38,7 +38,8 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
mv "${FR_DIR}build/tmp/${DIR}/${SUB}" "${FR_DIR}${DIR}"
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
RUN_INSTALL="true"
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
Expand All @@ -63,7 +64,7 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
mv "${FR_DIR}build/tmp/${DIR}/${SUB}" "${FR_DIR}${DIR}"
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -87,7 +88,7 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
mv "${FR_DIR}build/tmp/${DIR}/${SUB}" "${FR_DIR}${DIR}"
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -96,7 +97,7 @@ fi
JDK_8_DIR="${FR_DIR}build/jdk8u392-b08"
JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.2+13"
if [[ ! -d "${JDK_8_DIR}" ]]; then
RUN_INSTALL="true"
fi
Expand All @@ -110,7 +111,6 @@ if [[ ! -d "${FR_DIR}build/apache-maven-3.9.5" ]]; then
RUN_INSTALL="true"
fi
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
if [[ "$RUN_INSTALL" == "true" ]]; then
Expand Down
Loading

0 comments on commit 2c71936

Please sign in to comment.