diff options
author | txtsd <thexerothermicsclerodermoid@gmail.com> | 2022-02-08 08:55:52 +0530 |
---|---|---|
committer | txtsd <thexerothermicsclerodermoid@gmail.com> | 2022-02-11 18:05:26 +0530 |
commit | 0ba61bb5903a22044decaa9390437e83be0dadd7 (patch) | |
tree | 536ed4ba5fd08c0961fcd488155a9e29ac9ffe33 /.github | |
parent | 94974851037f2c9ad313cfa72c65192be7c5ca64 (diff) | |
download | PrismLauncher-0ba61bb5903a22044decaa9390437e83be0dadd7.tar.gz PrismLauncher-0ba61bb5903a22044decaa9390437e83be0dadd7.tar.bz2 PrismLauncher-0ba61bb5903a22044decaa9390437e83be0dadd7.zip |
Implement even more PR suggestions
Diffstat (limited to '.github')
-rwxr-xr-x | .github/scripts/prepare_JREs.sh | 38 | ||||
-rw-r--r-- | .github/workflows/build.yml | 2 |
2 files changed, 16 insertions, 24 deletions
diff --git a/.github/scripts/prepare_JREs.sh b/.github/scripts/prepare_JREs.sh index 1525fdb9..b85e9c2f 100755 --- a/.github/scripts/prepare_JREs.sh +++ b/.github/scripts/prepare_JREs.sh @@ -13,33 +13,25 @@ for file in *; do mkdir temp - # Handle OpenJDK17 archive - re='(OpenJDK17U-jre_x64_linux_hotspot_17.(.*).tar.gz)' + re='(OpenJDK([[:digit:]]+)U-jre_x64_linux_hotspot_([[:digit:]]+)(.*).tar.gz)' if [[ $file =~ $re ]]; then - version=${BASH_REMATCH[2]} - version_edit=$(echo $version | sed -e 's/_/+/g') - dir_name=jdk-17.$version_edit-jre - echo $dir_name - mkdir jre17 + 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 . ../../jre17 - popd - - fi - - # Handle OpenJDK8 archive - re='(OpenJDK8U-jre_x64_linux_hotspot_8(.*).tar.gz)' - if [[ $file =~ $re ]]; - then - version=${BASH_REMATCH[2]} - version_edit=$(echo $version | sed -e 's/b/-b/g') - dir_name=jdk8$version_edit-jre - mkdir jre8 - tar -xzf $file -C temp - pushd temp/$dir_name - cp -r . ../../jre8 + cp -r . ../../jre$version_major popd fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 600831c0..42661b09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,7 @@ jobs: LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_DIR }}/usr/lib/jvm/java-17-openjdk/lib/server" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_DIR }}/usr/lib/jvm/java-17-openjdk/lib" - ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_DIR }} --output appimage --plugin qt -d ${{ env.INSTALL_DIR }}/usr/share/applications/org.polymc.polymc.desktop -i ${{ env.INSTALL_DIR }}/usr/share/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg + ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_DIR }} --output appimage --plugin qt -i ${{ env.INSTALL_DIR }}/usr/share/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg - name: Run windeployqt if: runner.os == 'Windows' |