Skip to content

Commit 0df9dfe

Browse files
committed
Fix mac JDK path name
1 parent 71ef910 commit 0df9dfe

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

installers/download-jdks.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,26 @@ jdk_vendor="eclipse"
1111
function download_jdk {
1212
echo ">>> Downloading the JDK for $1_$2$3"
1313

14+
# Translate our OS names to Adoptium API OS names
15+
jdkOsString=$2
16+
case "$jdkOsString" in
17+
macos) jdkOsString="mac" ;;
18+
*)
19+
esac
20+
1421
if [ -f "$2-$1/jdk-$1_$2$3" ];
1522
then
1623
echo "<<< Already existing, SKIPPING."
1724
else
18-
curl -f -# -o "$2-$1/jdk-$1_$2$3" -L "https://api.adoptium.net/v3/binary/latest/$jdk_major_version/ga/$2/$1/jdk/$jvm_impl/normal/$jdk_vendor?project=jdk"
25+
curl -f -# -o "$2-$1/jdk-$1_$2$3" -L "https://api.adoptium.net/v3/binary/latest/$jdk_major_version/ga/$jdkOsString/$1/jdk/$jvm_impl/normal/$jdk_vendor?project=jdk"
1926
echo "<<< OK!"
2027
fi
2128
}
2229

2330
function get_jdk_macos {
2431
echo "> Getting the JDK for MacOS-$1"
2532

26-
download_jdk "$1" mac .tar.gz
33+
download_jdk "$1" macos .tar.gz
2734

2835
echo "< OK!"
2936
}

0 commit comments

Comments
 (0)