DistroHopper/OS/manjaro
zen0bit c087af2323 tmp
2024-04-10 21:20:44 +02:00

41 lines
1.3 KiB
Text

INFO=" |Manjaro|Arch||https://manjaro.org/|Versatile, free, and open-source Linux operating system designed with a strong focus on safeguarding user privacy and offering extensive control over hardware.";;
function editions_manjaro(){
echo full minimal
}
function releases_manjaro() {
echo xfce \
gnome \
plasma \
budgie \
cinnamon \
i3 \
mate \
sway
}
function get_manjaro() {
local EDITION="${1:-}"
local HASH=""
local ISO=""
local MANIFEST=""
local URL=""
local TYPE=""
case ${RELEASE} in
sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";;
gnome|xfce|plasma) TYPE="official";;
*) TYPE="community";;
esac
[[ ${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_1)
echo "${URL} ${HASH}"
}