From d408e15f512d713e28602a5c07f3b3dd4cb09081 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 May 2024 00:25:38 +0100 Subject: [PATCH] refactor: simplify get_tuxedo-os() --- quickget | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index ba2ece4..4f16bc6 100755 --- a/quickget +++ b/quickget @@ -2560,13 +2560,12 @@ function get_truenas-core() { } function get_tuxedo-os() { + local HASH="" local ISO="" - local URL="" - local Current= - Current="$(web_pipe "https://os.tuxedocomputers.com/" | grep -m 1 current.iso | cut -d '=' -f 4 | cut -d '"' -f 2)" - URL="https://os.tuxedocomputers.com/${Current}" - HASH="$(web_pipe "https://os.tuxedocomputers.com/checksums/${Current}.sha256" | cut -d ' ' -f 1)" - echo "${URL} ${HASH}" + local URL="https://os.tuxedocomputers.com" + ISO="$(web_pipe "https://os.tuxedocomputers.com/" | grep -m 1 current.iso | cut -d '=' -f 4 | cut -d '"' -f 2)" + HASH="$(web_pipe "https://os.tuxedocomputers.com/checksums/${ISO}.sha256" | cut -d ' ' -f 1)" + echo "${URL}/${ISO} ${HASH}" } function get_ubuntu-server() {