Refactor get_gentoo()

pull/373/head
Martin Wimpress 3 years ago
parent 98fe5899d0
commit 71d63d2ea2
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 18
      quickget

@ -922,21 +922,13 @@ function get_fedora() {
function get_gentoo() { function get_gentoo() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/"
local LOCAT=""
local INSTALLMIN=""
validate_release "releases_gentoo" validate_release "releases_gentoo"
eval $( wget -O/tmp/gentoolatest https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/${RELEASE}-iso.txt 2>&1 |grep Location | awk '{print "LOCAT="$2}' ) ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1)
LOCAT=$(dirname ${LOCAT}) HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep iso | grep -v CONTENTS | cut -d' ' -f1)
eval $( awk '/admincd-amd64/ {print "ADMIN="$1}; /install-amd64-minimal/ {print "INSTALLMIN="$1}' /tmp/gentoolatest ) web_get "${URL}/${ISO}" "${VM_PATH}"
URL="${LOCAT}/${INSTALLMIN}" check_hash "$(basename ${ISO})" "${HASH}"
ISO=$(basename "${INSTALLMIN}" )
web_get "${URL}" "${VM_PATH}"
HASH=$(wget -q -O- ${LOCAT}/${INSTALLMIN}.DIGESTS|grep -e iso|grep -v -e CONT -e catalyst|cut -d\ -f1)
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }

Loading…
Cancel
Save