refactor: update ubuntu-server to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 22:47:38 +01:00 committed by Martin Wimpress
parent ee3d432736
commit 7984fe2e5e
1 changed files with 2 additions and 2 deletions

View File

@ -2866,11 +2866,11 @@ function get_ubuntu-server() {
URL="https://releases.ubuntu.com/${RELEASE}"
fi
if wget -q --spider "${URL}/SHA256SUMS"; then
DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d'*' -f2 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA})
else
DATA=$(wget -qO- "${URL}/MD5SUMS" | grep 'live-server' | grep amd64 | grep iso)
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d' ' -f3 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA})
fi