Skip to content

Commit 12fd850

Browse files
committed
Little bit hacky download for the latest JDK 17
1 parent 202425d commit 12fd850

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jdks/download-jdks.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ set -e # Quit on Error
1313
jdk_major_version="17"
1414
jdk_version="0.9"
1515
jdk_build_version="9"
16+
# JDK 17.0.9 seems to have botched up release causing download URL to vary and platform versions not on the same step
17+
jdk_build_tmp_version="9.1"
1618

1719
function download_jdk {
1820
echo ">>> Downloading the JDK for $1"
1921

2022
if [ -f downloads/jdk-$1$2 ];
2123
then
2224
echo "<<< Already existing, SKIPPING."
25+
elif [[ "$1" == *windows ]];
26+
then
27+
curl -# -o downloads/jdk-$1$2 -L https://github.com/adoptium/temurin$jdk_major_version-binaries/releases/download/jdk-$jdk_major_version.$jdk_version+$jdk_build_tmp_version/OpenJDK${jdk_major_version}U-jdk_$1_hotspot_$jdk_major_version.${jdk_version}_$jdk_build_version$2
28+
echo "<<< OK!"
2329
else
2430
curl -# -o downloads/jdk-$1$2 -L https://github.com/adoptium/temurin$jdk_major_version-binaries/releases/download/jdk-$jdk_major_version.$jdk_version+$jdk_build_version/OpenJDK${jdk_major_version}U-jdk_$1_hotspot_$jdk_major_version.${jdk_version}_$jdk_build_version$2
2531
echo "<<< OK!"

0 commit comments

Comments
 (0)