manjaro: update

https://github.com/quickemu-project/quickemu/pull/742
This commit is contained in:
zenobit 2023-09-14 15:53:27 +02:00
parent 4f400b0523
commit 27534985e7

View file

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