refactor: update endeavouros to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 14:18:18 +01:00 committed by Martin Wimpress
parent 1a25318d89
commit 00e80c6fd2
1 changed files with 3 additions and 3 deletions

View File

@ -2103,9 +2103,9 @@ function get_endeavouros() {
local HASH="" local HASH=""
local URL="https://mirror.alpix.eu/endeavouros/iso" local URL="https://mirror.alpix.eu/endeavouros/iso"
# Find EndeavourOS releases from mirror, pick one matching release # Find EndeavourOS releases from mirror, pick one matching release
local ENDEAVOUR_RELEASES="$(curl -s "${URL}"/ | grep -o -P '(?<=<a href=").*(?=.iso">)' | grep -v 'x86_64')" local ENDEAVOUR_RELEASES="$(web_pipe "${URL}/" | grep -o -P '(?<=<a href=").*(?=.iso">)' | grep -v 'x86_64')"
local ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i ${RELEASE}).iso" local ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i "${RELEASE}").iso"
HASH=$(wget -q -O- "${URL}/${ISO}.sha512sum" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/${ISO}.sha512sum" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }