mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Fix index reference for Windows 11. Close #171
This commit is contained in:
parent
66fb440359
commit
d7fd4df03e
1 changed files with 7 additions and 1 deletions
8
quickget
8
quickget
|
@ -903,6 +903,7 @@ function get_ubuntu() {
|
|||
# Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb
|
||||
function get_windows() {
|
||||
local ARCH="x64"
|
||||
local INDEX=0
|
||||
local LANG_CODE="en"
|
||||
local LATEST_WINDOWS_VERSION=""
|
||||
local WINDOWS_NAME=""
|
||||
|
@ -917,9 +918,14 @@ function get_windows() {
|
|||
|
||||
validate_release "releases_windows"
|
||||
|
||||
# Ignore the most recent Windows 10 release for now.
|
||||
if [ ${RELEASE} -eq 10 ]; then
|
||||
INDEX=1
|
||||
fi
|
||||
|
||||
echo "Getting Windows ${RELEASE} URL..."
|
||||
WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))')
|
||||
LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))[1]')
|
||||
LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))['${INDEX}']')
|
||||
|
||||
WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name)
|
||||
VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id)
|
||||
|
|
Loading…
Reference in a new issue