From 392e74c16b36195b1e6eece7c051de00309ab6cd Mon Sep 17 00:00:00 2001 From: Jai A P Date: Mon, 16 Oct 2023 16:05:53 +0530 Subject: [PATCH] Updated manjaro fetching as migrated to new system (#742) * Updated manjaro fetching - Added sway release - Added choice to download minimal or full edition * Future proofing manjaro sway fetching * Forgot this kde -> plasma * Fix a typo * Update quickget --- quickget | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index ffe8a2d..53cf937 100755 --- a/quickget +++ b/quickget @@ -472,6 +472,10 @@ function editions_mxlinux(){ echo Xfce KDE Fluxbox } +function editions_manjaro(){ + echo full minimal +} + function releases_macos() { echo high-sierra mojave catalina big-sur monterey ventura } @@ -479,11 +483,12 @@ function releases_macos() { function releases_manjaro() { echo xfce \ gnome \ - kde \ + plasma \ budgie \ cinnamon \ i3 \ - mate + mate \ + sway } function releases_netboot() { @@ -1487,18 +1492,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}" } @@ -2289,6 +2306,15 @@ if [ -n "${2}" ]; then fi fi + # Handle missing Mangaro 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}"