From 636dc16f7a56b1e3efb7bc5dc939a5cef793b866 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Sun, 21 Apr 2024 09:49:17 +0100 Subject: [PATCH] feat: make editions_cachyos() dynamic and simplify --- quickget | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/quickget b/quickget index 7d4cb45..50da54f 100755 --- a/quickget +++ b/quickget @@ -853,7 +853,7 @@ function releases_cachyos() { } function editions_cachyos() { - echo kde gnome + echo $(web_pipe "https://mirror.cachyos.org/ISO/" | grep "title=" | grep -v testing | grep -v cli | cut -d'"' -f4 | cut -d '/' -f1 | sort) } function releases_centos-stream() { @@ -1906,15 +1906,11 @@ function get_bodhi() { } function get_cachyos() { - local HASH="" - local ISO="" - local URL="" - local release="" - release=$(web_pipe "https://mirror.cachyos.org/ISO/${EDITION}/" | grep -Po '(?<=">)[0-9]+(?=/)' | tail -n 1) - ISO="cachyos-${EDITION}-linux-${release}.iso" - URL="https://mirror.cachyos.org/ISO/${EDITION}/${release}" - HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1) - echo "${URL}/${ISO} ${HASH}" + local URL="https://mirror.cachyos.org/ISO/${EDITION}/" + local REL=$(web_pipe "${URL}" | grep -Po '(?<=">)[0-9]+(?=/)' | sort -ru | tail -n 1) + local ISO="cachyos-${EDITION}-linux-${REL}.iso" + local HASH=$(web_pipe "${URL}/${REL}/${ISO}.sha256" | cut_1) + echo "${URL}/${REL}/${ISO} ${HASH}" } function get_centos-stream() {