Compare commits

...

2 Commits

Author SHA1 Message Date
Kroese
e457b9ff7d
fix: Update download links 2024-12-20 05:34:04 +01:00
Kroese
bf93dd0f9f
Update define.sh 2024-12-20 04:10:51 +01:00
2 changed files with 3 additions and 2 deletions

View File

@ -620,10 +620,11 @@ getMG() {
} }
local list="" 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="" local result=""
result=$(echo "$list" | grep -i "${platform}" | grep "${pattern}" | grep -i -m 1 "${locale,,}_") 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 [ -z "$result" ]; then
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then