diff options
| author | LennyMcLennington <lenny@sneed.church> | 2022-02-11 12:38:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-11 12:38:03 +0000 |
| commit | fd72cb034c573deb44b7a8c7b875a3c0d9140013 (patch) | |
| tree | 3b3a7152065f4c50a0d0d1e75b0f6dce49782729 /.github/scripts | |
| parent | 234121233780d475c650635ff686d74d27c0d7fa (diff) | |
| parent | b9be8d08d2719aeafbb8f51327c4c1fa77cfd9db (diff) | |
| download | PrismLauncher-fd72cb034c573deb44b7a8c7b875a3c0d9140013.tar.gz PrismLauncher-fd72cb034c573deb44b7a8c7b875a3c0d9140013.tar.bz2 PrismLauncher-fd72cb034c573deb44b7a8c7b875a3c0d9140013.zip | |
Merge pull request #140 from txtsd/actions
CI: Build AppImages
Diffstat (limited to '.github/scripts')
| -rwxr-xr-x | .github/scripts/prepare_JREs.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/scripts/prepare_JREs.sh b/.github/scripts/prepare_JREs.sh new file mode 100755 index 00000000..b85e9c2f --- /dev/null +++ b/.github/scripts/prepare_JREs.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +URL_JDK8="https://api.adoptium.net/v3/binary/latest/8/ga/linux/x64/jre/hotspot/normal/eclipse" +URL_JDK17="https://api.adoptium.net/v3/binary/latest/17/ga/linux/x64/jre/hotspot/normal/eclipse" + +mkdir -p JREs +pushd JREs + +wget --content-disposition "$URL_JDK8" +wget --content-disposition "$URL_JDK17" + +for file in *; +do + mkdir temp + + re='(OpenJDK([[:digit:]]+)U-jre_x64_linux_hotspot_([[:digit:]]+)(.*).tar.gz)' + if [[ $file =~ $re ]]; + then + version_major=${BASH_REMATCH[2]} + version_trailing=${BASH_REMATCH[4]} + + if [ $version_major = 17 ]; + then + hyphen='-' + else + hyphen='' + fi + + version_edit=$(echo $version_trailing | sed -e 's/_/+/g' | sed -e 's/b/-b/g') + dir_name=jdk$hyphen$version_major$version_edit-jre + mkdir jre$version_major + tar -xzf $file -C temp + pushd temp/$dir_name + cp -r . ../../jre$version_major + popd + fi + + rm -rf temp +done + +popd |
