fix: Update download links

This commit is contained in:
Kroese 2024-12-20 05:36:46 +01:00 committed by GitHub
parent 11ecc3b935
commit c0729bbb64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -608,7 +608,7 @@ getMG() {
pattern="10_iot_enterprise_ltsc"
;;
esac
fi
local body=""
@ -620,10 +620,11 @@ getMG() {
}
local list=""
list=$(echo "$body" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep -i '\.iso$')
list=$(echo "$body" | xmllint --html --nonet --xpath "//a[contains(text(), '.iso')]" - 2>/dev/null)
local result=""
result=$(echo "$list" | grep -i "${platform}" | grep "${pattern}" | grep -i -m 1 "${locale,,}_")
result=$(echo "$result" | sed -r 's/.*href="([^"]+).*/\1/g')
if [ -z "$result" ]; then
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then