From 5483823651d714817ba712380f8a1bd8f4c9a3f4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:52:45 +0000 Subject: [PATCH] Refactor get_nixos() to add create_vm() compatibility --- quickget | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 21bd5e3..218532f 100755 --- a/quickget +++ b/quickget @@ -1009,15 +1009,10 @@ function get_netbsd() { function get_nixos() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" - - URL="https://channels.nixos.org/nixos-${RELEASE}" - ISO="latest-nixos-${EDITION}-x86_64-linux.iso" + local ISO="latest-nixos-${EDITION}-x86_64-linux.iso" + local URL="https://channels.nixos.org/nixos-${RELEASE}" HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_openbsd() {