From 27534985e7f38d40f2d31b015c6b69be0099c107 Mon Sep 17 00:00:00 2001 From: zenobit Date: Thu, 14 Sep 2023 15:53:27 +0200 Subject: [PATCH] manjaro: update https://github.com/quickemu-project/quickemu/pull/742 --- quickget | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index 1583428..54ffcd6 100755 --- a/quickget +++ b/quickget @@ -547,6 +547,10 @@ function releases_manjaro() { mate } +function editions_manjaro(){ + echo full minimal +} + function releases_mxlinux(){ echo 21.3 } @@ -1709,18 +1713,30 @@ function get_mageia() { } function get_manjaro() { + local EDITION="${1:-}" local HASH="" local ISO="" - local MANIFESTURL="" + local MANIFEST="" local URL="" + local TYPE="" case ${RELEASE} in - gnome|kde|xfce) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/official/${RELEASE}.md";; - budgie|cinnamon|deepin|i3|mate) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/community/${RELEASE}.md";; + sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";; + gnome|xfce|plasma) TYPE="official";; + *) TYPE="community";; esac - URL="$(wget -qO- "${MANIFESTURL}" | grep "Download_x64 =" | cut -d'"' -f2)" - HASH=$(wget -qO- "${MANIFESTURL}" | grep "Download_x64_Checksum =" | cut -d'"' -f2) + [[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)" + + [[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION="" + + if [[ ${RELEASE} != "sway" ]]; then + URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)" + else + URL="echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url'" + fi + + HASH=$(wget -qO- "${URL}.sha512" | cut -d' ' -f1) echo "${URL} ${HASH}" } @@ -2563,6 +2579,14 @@ if [ -n "${2}" ]; then fi fi + # Handle missing Manjaro Sway minimal + if [[ $OS == manjaro ]] ; then + if [[ ${RELEASE} == "sway" && ${EDITION} == "minimal" ]] ; then + echo "ERROR! Unsupported combination" + echo " Manjaro Sway does not have a minimal edition" + exit 1; + fi + fi VM_PATH="${OS}-${RELEASE}-${EDITION}" validate_release "releases_${OS}"