DistroHopper/public/ubuntu-cinnamon
2026-05-27 17:00:06 +02:00

121 lines
3.8 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Template file for 'ubuntu-cinnamon'
OSNAME="ubuntu-cinnamon"
PRETTY="Ubuntu Cinnamon"
LOGO=""
ICON="ubuntu-cinnamon.svg"
ICON_ONLINE=""
CATEGORY="Beginner, Desktop"
BASEDOF="Ubuntu"
DESCRIPTION="Community-driven, featuring Linux Mints Cinnamon Desktop with Ubuntu at the core, packed fast and full of features, here is the most traditionally modern desktop you will ever love"
HOMEPAGE="https://ubuntucinnamon.org"
CREDENTIALS="-"
GPG=""
RSS=""
DW="ubuntucinnamon"
MAGNET=""
CHAT=""
RELEASES="26.04 25.10 24.04 daily-live"
QEMU_ARCH="amd64"
releases_() {
local VERSION_DATA=""
local SUPPORTED_VERSIONS=()
VERSION_DATA="$(IFS=$'\n' web_pipe https://api.launchpad.net/devel/ubuntu/series | jq -r '.entries[]')"
# shellcheck disable=SC2207
SUPPORTED_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Supported" or .status=="Current Stable Release") | .version' <<<"${VERSION_DATA}" | sort))
case "${OS}" in
ubuntu)
echo "${SUPPORTED_VERSIONS[@]}" daily-live;;
kubuntu|lubuntu|ubuntu-kylin|ubuntu-mate|ubuntustudio|xubuntu)
# after 16.04
echo "${SUPPORTED_VERSIONS[@]:1}" daily-live;;
ubuntu-budgie)
# after 18.04
echo "${SUPPORTED_VERSIONS[@]:2}" daily-live;;
edubuntu|ubuntu-unity|ubuntu-cinnamon)
# after 23.10
echo "${SUPPORTED_VERSIONS[@]:5}" daily-live;;
esac
}
arch_() {
if [ -z "${RELEASE}" ]; then
echo "amd64 arm64"
return
fi
if [[ ! "${RELEASE}" =~ ^[0-9]+\.[0-9]+$ ]]; then
echo "amd64"
return
fi
local MAJOR="${RELEASE%%.*}"
local MINOR="${RELEASE##*.}"
local NUM_MINOR
NUM_MINOR=$((10#${MINOR}))
if [ "${MAJOR}" -gt 25 ] || { [ "${MAJOR}" -eq 25 ] && [ "${NUM_MINOR}" -ge 10 ]; }; then
echo "amd64 arm64"
else
echo "amd64"
fi
}
get_() {
local ISO=""
local HASH=""
local URL=""
local DATA=""
local QEMU_ARCH="${ARCH:-amd64}"
local CDIMAGE_OS="${OS}"
case "${OS}" in
ubuntu-cinnamon) CDIMAGE_OS="ubuntucinnamon";;
ubuntu-kylin) CDIMAGE_OS="ubuntukylin";;
esac
if [[ "${RELEASE}" == "daily"* ]] && [ "${OS}" == "ubuntustudio" ]; then
# Ubuntu Studio daily-live images are in the dvd directory
RELEASE="dvd"
fi
if [[ "${RELEASE}" == "jammy-daily" ]]; then
if [[ "${OS}" == "ubuntustudio" ]]; then
URL="https://cdimage.ubuntu.com/${CDIMAGE_OS}/jammy/dvd/current"
else
URL="https://cdimage.ubuntu.com/${CDIMAGE_OS}/jammy/daily-live/current"
fi
VM_PATH="${OS}-jammy-live"
elif [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
URL="https://cdimage.ubuntu.com/${CDIMAGE_OS}/${RELEASE}/current"
VM_PATH="${OS}-${RELEASE}"
elif [ "${OS}" == "ubuntu" ]; then
URL="https://releases.ubuntu.com/${RELEASE}"
else
URL="https://cdimage.ubuntu.com/${CDIMAGE_OS}/releases/${RELEASE}/release"
fi
if web_check "${URL}/SHA256SUMS"; then
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep "${QEMU_ARCH}" | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<"${DATA}" | sed '1q;d')
HASH=$(cut -d' ' -f1 <<<"${DATA}" | sed '1q;d')
else
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep "${QEMU_ARCH}" | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<"${DATA}")
HASH=$(cut -d' ' -f1 <<<"${DATA}")
fi
if [ -z "${ISO}" ] || [ -z "${HASH}" ]; then
echo "${PRETTY} ${RELEASE} is currently unavailable. Please select other OS/Release combination" >&2
exit 1
fi
if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
make_vm_config "${OS}-devel.iso"
elif [[ "${RELEASE}" == "jammy-daily" ]]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-jammy-live.iso"
make_vm_config "${OS}-jammy-live.iso"
else
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
fi
}
config_() {
[[ "${RELEASE}" == *"daily"* ]] && echo "disk_size=\"32G\"" >> "${CONF_FILE}"
}