refactor: simplify get_gentoo()

This commit is contained in:
Martin Wimpress 2024-04-20 10:53:52 +01:00 committed by Martin Wimpress
parent 4e891ec52d
commit de798af9b0
1 changed files with 3 additions and 6 deletions

View File

@ -2182,13 +2182,10 @@ function get_gentoo() {
local ISO=""
local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/"
case ${EDITION} in
minimal)
ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep install | cut_1)
HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut_1);;
livegui)
ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep livegui | cut -d' ' -f1)
HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut_1);;
minimal) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep install | cut_1);;
livegui) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep livegui | cut_1);;
esac
HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut_1)
echo "${URL}/${ISO} ${HASH}"
}