refactor: update cachyos to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 14:15:03 +01:00 committed by Martin Wimpress
parent 1afade4eda
commit 911726aa61
1 changed files with 2 additions and 2 deletions

View File

@ -1935,10 +1935,10 @@ function get_cachyos() {
local ISO="" local ISO=""
local URL="" local URL=""
local release="" local release=""
release=$(curl "https://mirror.cachyos.org/ISO/${EDITION}/" | grep -Po '(?<=">)[0-9]+(?=/</a>)' | tail -n 1) release=$(web_pipe "https://mirror.cachyos.org/ISO/${EDITION}/" | grep -Po '(?<=">)[0-9]+(?=/</a>)' | tail -n 1)
ISO="cachyos-${EDITION}-linux-${release}.iso" ISO="cachyos-${EDITION}-linux-${release}.iso"
URL="https://mirror.cachyos.org/ISO/${EDITION}/${release}" URL="https://mirror.cachyos.org/ISO/${EDITION}/${release}"
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut_1) HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }