refactor: tidy up get_chimeralinux()

This commit is contained in:
Martin Wimpress 2024-04-21 09:55:04 +01:00 committed by Martin Wimpress
parent 592572345c
commit 41b734e23a

View File

@ -1922,13 +1922,10 @@ function get_centos-stream() {
function get_chimeralinux() {
local EDITION="${1:-}"
local HASH=""
local DATE=""
local ISO=""
local URL="https://repo.chimera-linux.org/live/${RELEASE}"
DATE=$(web_pipe "${URL}/sha256sums.txt" | head -n1 | cut -d'-' -f5)
ISO="chimera-linux-x86_64-LIVE-${DATE}-${EDITION}.iso"
HASH=$(web_pipe "${URL}/sha256sums.txt" | grep 'x86_64-LIVE' | grep "${EDITION}" | cut_1)
local DATE=$(web_pipe "${URL}/sha256sums.txt" | head -n1 | cut -d'-' -f5)
local ISO="chimera-linux-x86_64-LIVE-${DATE}-${EDITION}.iso"
local HASH=$(web_pipe "${URL}/sha256sums.txt" | grep 'x86_64-LIVE' | grep "${EDITION}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}