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}"