Skip to content

Commit

Permalink
Complete the jdk folder name from the archive
Browse files Browse the repository at this point in the history
Fixes #34
  • Loading branch information
merks committed Dec 9, 2024
1 parent 14a4c04 commit dc8c90c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion releng/org.eclipse.justj.releng/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def java24Adoptium = [
https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24+26-ea-beta/OpenJDK-jdk_x64_windows_hotspot_24_26-ea.zip
''',
JDK_URLS_WINDOWS_AARCH64: '''
https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24+25-ea-beta/OpenJDK-jdk_aarch64_windows_hotspot_24_25-ea.zip
https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24+26-ea-beta/OpenJDK-jdk_aarch64_windows_hotspot_24_26-ea.zip
''',
JDK_URLS_MACOS: '''
https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24+26-ea-beta/OpenJDK-jdk_x64_mac_hotspot_24_26-ea.tar.gz
Expand Down
16 changes: 11 additions & 5 deletions releng/org.eclipse.justj.releng/build-jre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,20 @@ if [ ! -f $eclipse_file ]; then
curl -O -L -J $eclipse_url
fi

# Extract the JDK; the folder name is expected to start with jdk[1-9-].

# Compute the root folder name from the contents archive.
#
if [[ $os == win ]]; then
jdk=$(unzip -qql $file | head -1 | sed 's/.* //;s%/%%')
else
jdk=$(tar -ztf $file | head -1 | sed 's%/%%')
fi

# Extract the JDK.
#
rm -rf jdk[1-9-]*
jdk="jdk[1-9-]*"
rm -rf $jdk
if [ ! -d $jdk ]; then
echo "Unpackaging $file"
#rm -rf $jdk
if [[ $os == win ]]; then
unzip -q $file
else
Expand All @@ -196,7 +203,6 @@ fi

# A sanity test that the JDK has been unpacked.
#
jdk=$(echo jdk[1-9-]*)
echo "JDK Folder: $jdk"
echo "JDK Version:"
$jdk/$jdk_relative_bin_folder/java -version
Expand Down

0 comments on commit dc8c90c

Please sign in to comment.