Skip to content

Commit

Permalink
Merge remote-tracking branch 'jai-JAP/alpine' into merging-updated-di…
Browse files Browse the repository at this point in the history
…stros
  • Loading branch information
philclifford committed Jan 17, 2022
2 parents f1604ee + 35d174d commit 5e58fd4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/),[ArcoLinux](https://www.arcolinux.info/), [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/)
Expand Down Expand Up @@ -177,6 +178,7 @@ preferred flavour.
`quickget` also supports:

* `alma`
* `alpine`
* `archlinux`
* `arcolinux`
* `debian`
Expand Down
41 changes: 41 additions & 0 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -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";;
arcolinux) PRETTY_NAME="Arco Linux";;
Expand Down Expand Up @@ -163,6 +164,7 @@ function list_csv() {

function os_support() {
echo alma \
alpine \
android \
archlinux \
arcolinux \
Expand Down Expand Up @@ -206,6 +208,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 \
Expand Down Expand Up @@ -526,6 +536,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"
Expand Down Expand Up @@ -717,6 +730,30 @@ 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
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- "${MANIFESTURL}" | 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=""
Expand Down Expand Up @@ -1678,6 +1715,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
Expand Down Expand Up @@ -1789,6 +1828,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
Expand Down

0 comments on commit 5e58fd4

Please sign in to comment.