DistroHopper/templates/manjaro
2026-05-27 17:00:06 +02:00

79 lines
2.1 KiB
Text

# Template file for 'manjaro'
OSNAME="manjaro"
PRETTY="Manjaro"
LOGO=" "
ICON="manjaro.svg"
ICON_ONLINE="https://distrowatch.com/images/yvzhuwbpy/manjaro.png"
CATEGORY="Beginner"
BASEDOF="Arch"
HOMEPAGE="https://manjaro.org"
DESCRIPTION="Versatile, free, and open-source Linux operating system designed with a strong focus on safeguarding user privacy and offering extensive control over hardware"
CREDENTIALS="-"
GPG=""
RSS=""
DW=""
function releases_() {
echo xfce gnome plasma cinnamon i3 sway
}
function editions_() {
echo full minimal
}
function get_() {
local HASH=""
local ISO=""
local MANIFEST=""
local URL=""
local TYPE="official"
MANIFEST="$(web_pipe https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
case "${RELEASE}" in
sway)
MANIFEST="$(web_pipe https://mirror.manjaro-sway.download/manjaro-sway/release.json)"
TYPE="sway"
;;
cinnamon|i3) TYPE="community";;
esac
if [ "${EDITION}" == "minimal" ] && [ "${TYPE}" != "sway" ]; then
EDITION=".minimal"
else
EDITION=""
fi
if [ "${RELEASE}" == "sway" ]; then
URL=$(echo "${MANIFEST}" | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | .url')
else
URL="$(echo "${MANIFEST}" | jq -r ."${TYPE}.${RELEASE}${EDITION}".image)"
fi
HASH=$(web_pipe "${URL}.sha512" | cut -d' ' -f1)
echo "${URL} ${HASH}"
}
function get_() {
local HASH=""
local MANIFEST=""
local URL=""
local TYPE="official"
MANIFEST="$(web_pipe https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
case "${RELEASE}" in
sway)
MANIFEST="$(web_pipe https://mirror.manjaro-sway.download/manjaro-sway/release.json)"
TYPE="sway"
;;
cinnamon|i3) TYPE="community";;
esac
local ED=""
[ "${EDITION}" == "minimal" ] && [ "${TYPE}" != "sway" ] && ED=".minimal"
if [ "${RELEASE}" == "sway" ]; then
URL=$(echo "${MANIFEST}" | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | .url')
else
URL="$(echo "${MANIFEST}" | jq -r ".${TYPE}.${RELEASE}${ED}.image")"
fi
HASH=$(web_pipe "${URL}.sha512" | cut -d' ' -f1)
echo "${URL} ${HASH}"
}