File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,19 +11,26 @@ jdk_vendor="eclipse"
1111function 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
2330function 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}
You can’t perform that action at this time.
0 commit comments