From 7dc6572bdff7b9675d5d176c06da3c94a896c4ca Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:02:25 +0000 Subject: [PATCH] Refactor get_alma() to add create_vm() compatibility --- quickget | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/quickget b/quickget index c817c57..fa4805b 100755 --- a/quickget +++ b/quickget @@ -674,15 +674,10 @@ EOF function get_alma() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" - - URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/" - ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso" - HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \("${ISO}" | cut -d'\' -f4)" - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + local ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso" + local URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/" + HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)" + echo "${URL}/${ISO} ${HASH}" } function get_alpine() {