Skip to content

Commit 2b24f65

Browse files
authored
Merge pull request #555 from tonihele/feature/jdk-download-tweak
Feature/jdk download tweak
2 parents e52c2a7 + 12fd850 commit 2b24f65

File tree

1 file changed

+6
-51
lines changed

1 file changed

+6
-51
lines changed

jdks/download-jdks.sh

+6-51
Original file line numberDiff line numberDiff line change
@@ -13,64 +13,19 @@ set -e # Quit on Error
1313
jdk_major_version="17"
1414
jdk_version="0.9"
1515
jdk_build_version="9"
16-
platforms=( "x64_linux" "x86-32_windows" "x64_windows" "x64_mac" )
17-
18-
# DEPRECATED (not required anymore)
19-
function install_xar {
20-
# This is needed to open Mac OS .pkg files on Linux...
21-
echo ">> Compiling xar, just for you..."
22-
wget -q https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz
23-
tar xf xar-1.5.2.tar.gz
24-
cd xar-1.5.2
25-
./configure -q > /dev/null
26-
make -s > /dev/null
27-
cd ../
28-
echo "<< OK!"
29-
}
30-
31-
# DEPRECATED (not required anymore)
32-
function install_seven_zip {
33-
# This is due to not having root privilegs for apt-get
34-
if [ -x "$(command -v 7z)" ]; then
35-
return 0
36-
fi
37-
38-
echo "> Installing 7zip"
39-
40-
if [ -x "7zip/bin/7z" ]; then
41-
echo ">> Found cached 7zip, adjusting path"
42-
cd 7zip/bin
43-
PATH=`pwd`:$PATH
44-
cd ../../
45-
return 0
46-
fi
47-
48-
echo ">> Compiling 7zip from source"
49-
mkdir -p 7zip/bin
50-
mkdir -p 7zip/lib
51-
cd 7zip
52-
wget -q http://downloads.sourceforge.net/project/p7zip/p7zip/15.09/p7zip_15.09_src_all.tar.bz2
53-
tar xf p7zip*
54-
rm *.bz2
55-
cd p7zip*
56-
make all3 > /dev/null
57-
./install.sh ../bin ../lib /dev/null /dev/null
58-
#mv -v bin/ ../
59-
cd ../
60-
rm -rf p7zip*
61-
cd bin
62-
PATH=`pwd`:$PATH
63-
cd ../lib
64-
PATH=`pwd`:$PATH
65-
cd ../../
66-
}
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"
6718

6819
function download_jdk {
6920
echo ">>> Downloading the JDK for $1"
7021

7122
if [ -f downloads/jdk-$1$2 ];
7223
then
7324
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!"
7429
else
7530
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
7631
echo "<<< OK!"

0 commit comments

Comments
 (0)