refactor: simplify get_tuxedo-os()

This commit is contained in:
Martin Wimpress 2024-05-07 00:25:38 +01:00 committed by Martin Wimpress
parent 3ca857ace8
commit d408e15f51
1 changed files with 5 additions and 6 deletions

View File

@ -2560,13 +2560,12 @@ function get_truenas-core() {
} }
function get_tuxedo-os() { function get_tuxedo-os() {
local HASH=""
local ISO="" local ISO=""
local URL="" local URL="https://os.tuxedocomputers.com"
local Current= ISO="$(web_pipe "https://os.tuxedocomputers.com/" | grep -m 1 current.iso | cut -d '=' -f 4 | cut -d '"' -f 2)"
Current="$(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)"
URL="https://os.tuxedocomputers.com/${Current}" echo "${URL}/${ISO} ${HASH}"
HASH="$(web_pipe "https://os.tuxedocomputers.com/checksums/${Current}.sha256" | cut -d ' ' -f 1)"
echo "${URL} ${HASH}"
} }
function get_ubuntu-server() { function get_ubuntu-server() {