From 0ccf24de2aa61167356d02e3fae748e60ac5ade0 Mon Sep 17 00:00:00 2001 From: zenobit Date: Tue, 18 Feb 2025 03:45:00 +0100 Subject: [PATCH] Move config to.. --- TODO/redox-os | 18 ++++++++++++++++++ quickget | 17 ----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/TODO/redox-os b/TODO/redox-os index 050c114..337eff6 100644 --- a/TODO/redox-os +++ b/TODO/redox-os @@ -24,3 +24,21 @@ function get_() { HASH="$(echo "${DATA}" | cut_1)" echo "${URL}/${ISO} ${HASH}" } + +function distro_specific() { + if [[ ${ISO} =~ ".zst" ]]; then + zstd -d "${VM_PATH}/${ISO}" + ISO="${ISO/.zst/}" + if [[ ${ISO} =~ ".img" ]]; then + QEMU_IMG=$(command -v qemu-img) + if [ ! -x "${QEMU_IMG}" ]; then + echo $"ERROR! qemu-img not found. Please make sure qemu-img is installed." + exit 1 + fi + qemu-img convert -f raw -O qcow2 "${VM_PATH}/${ISO}" "${VM_PATH}/disk.qcow2" + ISO="${ISO/.img/}" + else + ISO="${ISO/.zst/}" + fi + fi +} diff --git a/quickget b/quickget index e022595..69738b7 100755 --- a/quickget +++ b/quickget @@ -656,23 +656,6 @@ function create_vm() { # shellcheck disable=SC2076 case "${OS}" in - #TODO - redox-os) - if [[ ${ISO} =~ ".zst" ]]; then - zstd -d "${VM_PATH}/${ISO}" - ISO="${ISO/.zst/}" - if [[ ${ISO} =~ ".img" ]]; then - QEMU_IMG=$(command -v qemu-img) - if [ ! -x "${QEMU_IMG}" ]; then - echo $"ERROR! qemu-img not found. Please make sure qemu-img is installed." - exit 1 - fi - qemu-img convert -f raw -O qcow2 "${VM_PATH}/${ISO}" "${VM_PATH}/disk.qcow2" - ISO="${ISO/.img/}" - else - ISO="${ISO/.zst/}" - fi - fi;; esac make_vm_config "${ISO}" }