download from releases instead

This commit is contained in:
FlexBy420
2025-11-02 15:29:59 +01:00
committed by Megamouse
parent ff922f6324
commit 50eb46d294
5 changed files with 81 additions and 30 deletions
+16 -6
View File
@@ -26,12 +26,22 @@ curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> .
# Download translations
mkdir -p ./bin/share/qt6/translations
curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/contents/qm" \
| grep '"download_url":' \
| cut -d '"' -f 4 \
| while read -r url; do
curl -fsSL "$url" -o "./bin/share/qt6/translations/$(basename "$url")"
done
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
| grep "browser_download_url" \
| grep "RPCS3-languages.zip" \
| cut -d '"' -f 4)
if [ -z "$ZIP_URL" ]; then
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
else
echo "Downloading translations from: $ZIP_URL"
curl -L -o translations.zip "$ZIP_URL" || {
echo "Failed to download translations.zip. Continuing without translations."
exit 0
}
unzip -o translations.zip -d "./bin/share/qt6/translations" >/dev/null 2>&1 || \
echo "Failed to extract translations.zip. Continuing without translations."
rm -f translations.zip
fi
# Package artifacts
7z a -m0=LZMA2 -mx9 "$BUILD" ./bin/*