From 435e427c9c8810c299b9d99421fd2eaaa83cd0a8 Mon Sep 17 00:00:00 2001 From: Jai A P <78354625+Jai-JAP@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:53:04 +0530 Subject: [PATCH 1/4] Add Alpine Linux support --- quickget | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/quickget b/quickget index 235fd9a..d8f5173 100755 --- a/quickget +++ b/quickget @@ -36,6 +36,7 @@ function pretty_name() { SIMPLE_NAME="${1}" case ${SIMPLE_NAME} in alma) PRETTY_NAME="Alma Linux";; + alpine) PRETTY_NAME="Alpine Linux";; android) PRETTY_NAME="Android x86";; archlinux) PRETTY_NAME="Arch Linux";; elementary) PRETTY_NAME="elementary OS";; @@ -161,6 +162,7 @@ function list_csv() { function os_support() { echo alma \ + alpine \ android \ archlinux \ debian \ @@ -202,6 +204,14 @@ function releases_alma() { 8.5 } +function releases_alpine() { + echo latest \ + 3.12 \ + 3.13 \ + 3.14 \ + 3.15 +} + function releases_android() { echo 9.0 \ 8.1 \ @@ -513,6 +523,9 @@ function make_vm_config() { if [ "${OS}" == "alma" ]; then GUEST="linux" IMAGE_TYPE="iso" + elif [ "${OS}" == "alpine" ]; then + GUEST="linux" + IMAGE_TYPE="iso" elif [ "${OS}" == "android" ]; then GUEST="linux" IMAGE_TYPE="iso" @@ -692,6 +705,31 @@ function get_alma() { check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } + +function get_alpine() { + local HASH="" + local ISO="" + local URL="" + local VERSION="" + local BRANCH="" + + validate_release "releases_alpine" + if [[ "${RELEASE}" == "latest" ]]; then + BRANCH="latest-stable" + else + BRANCH="v${RELEASE}" + fi + VERSION=$(wget -qO- 'https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml' \ + | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') + ISO="alpine-virt-${VERSION}-x86_64.iso" + URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/${ISO}" + web_get "${URL}" "${VM_PATH}" + HASH=$(wget -qO- 'https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml' \ + | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_archlinux() { local HASH="" local ISO="" @@ -1623,6 +1661,8 @@ if [ -n "${2}" ]; then fi VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" get_alma "${ISOTYPE}" + elif [ "${OS}" == "alpine" ]; then + get_alpine elif [ "${OS}" == "android" ]; then get_android elif [ "${OS}" == "archlinux" ]; then @@ -1730,6 +1770,8 @@ else echo -n "ERROR! You must specify a release: " if [ "${OS}" == "alma" ]; then releases_alma + elif [ "${OS}" == "alpine" ]; then + releases_alpine elif [ "${OS}" == "android" ]; then releases_android elif [ "${OS}" == "archlinux" ]; then From b4c940e789f9696c0114ea13d30101121e637ca8 Mon Sep 17 00:00:00 2001 From: Jai A P <78354625+Jai-JAP@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:53:40 +0530 Subject: [PATCH 2/4] Update quickget --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index d8f5173..d4db17a 100755 --- a/quickget +++ b/quickget @@ -36,7 +36,7 @@ function pretty_name() { SIMPLE_NAME="${1}" case ${SIMPLE_NAME} in alma) PRETTY_NAME="Alma Linux";; - alpine) PRETTY_NAME="Alpine Linux";; + alpine) PRETTY_NAME="Alpine Linux";; android) PRETTY_NAME="Android x86";; archlinux) PRETTY_NAME="Arch Linux";; elementary) PRETTY_NAME="elementary OS";; From 3454f4fae04491ee760d958b9dc01dc476c37d7a Mon Sep 17 00:00:00 2001 From: Jai A P <78354625+Jai-JAP@users.noreply.github.com> Date: Fri, 31 Dec 2021 17:05:00 +0530 Subject: [PATCH 3/4] Update quickget --- quickget | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index d4db17a..cff4832 100755 --- a/quickget +++ b/quickget @@ -719,13 +719,12 @@ function get_alpine() { else BRANCH="v${RELEASE}" fi - VERSION=$(wget -qO- 'https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml' \ - | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') + MANIFESTURL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml" + VERSION=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') ISO="alpine-virt-${VERSION}-x86_64.iso" URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/${ISO}" web_get "${URL}" "${VM_PATH}" - HASH=$(wget -qO- 'https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml' \ - | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') + HASH=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } From 35d174d241fe4ea93dbf51f3a78033553018e316 Mon Sep 17 00:00:00 2001 From: Jai A P <78354625+Jai-JAP@users.noreply.github.com> Date: Sat, 1 Jan 2022 11:05:25 +0530 Subject: [PATCH 4/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 78ac412..70347dc 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ comprehensive support for macOS and Windows**. * [Debian](https://www.debian.org/) (bullseye with all the official and non-free DE variants) * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) * [Alma Linux](https://almalinux.org/) + * [Alpine Linux](https://www.alpinelinux.org/) * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) * [Oracle Linux](https://www.oracle.com/linux/) and [Rocky Linux](https://rockylinux.org/) @@ -177,6 +178,7 @@ preferred flavour. `quickget` also supports: * `alma` + * `alpine` * `archlinux` * `debian` * `elementary`