fix(quickget): extract Archcraft version folder from redirect URL

The hash URL was incorrectly using 'v${RELEASE}' (e.g., 'vlatest')
instead of extracting the actual version folder from the redirect URL.
Since releases_archcraft returns 'latest', the download redirect goes
to a versioned folder like 'v25.10', but the hash file lookup used
'vlatest' which doesn't exist.

Extract the version folder from the redirect URL to construct the
correct hash file path.
This commit is contained in:
Martin Wimpress 2026-01-24 01:38:01 +00:00 committed by Martin Wimpress
parent 7a59041120
commit c66827ccb1
1 changed files with 3 additions and 1 deletions

View File

@ -1602,10 +1602,12 @@ function get_archcraft() {
local HASH=""
local ISO=""
local URL=""
local VERSION_FOLDER=""
URL="https://sourceforge.net/projects/archcraft/files/${RELEASE}/download"
URL="$(web_redirect "${URL}" | cut -d? -f1)"
ISO="$(basename "${URL}")"
HASH=$(web_pipe "https://sourceforge.net/projects/archcraft/files/v${RELEASE}/${ISO}.sha256sum" | cut -d' ' -f1)
VERSION_FOLDER="$(dirname "${URL}" | xargs basename)"
HASH=$(web_pipe "https://sourceforge.net/projects/archcraft/files/${VERSION_FOLDER}/${ISO}.sha256sum" | cut -d' ' -f1)
echo "${URL} ${HASH}"
}