From ad9842329f717a846da6472f67c572e32c5aef00 Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Sun, 12 Jul 2026 23:10:07 +0200 Subject: [PATCH] Support Linux Mint in BuildLinux.sh by mapping to its Ubuntu base Linux Mint reports ID=linuxmint in /etc/os-release and has no matching linux.d profile, so BuildLinux.sh aborted with "distribution not supported". Map linuxmint to its Ubuntu equivalent: Mint 22.x (Ubuntu 24.04 base) -> debian2, else debian. Uses an integer major-version compare to avoid a bc dependency during detection. --- BuildLinux.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/BuildLinux.sh b/BuildLinux.sh index 29bf8a47..2b9b1d25 100644 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -115,6 +115,19 @@ then DISTRIBUTION="debian2" fi fi +# Treat Linux Mint like its Ubuntu base (Mint 22.x is based on Ubuntu 24.04) +if [ "${DISTRIBUTION}" == "linuxmint" ] +then + DISTRIBUTION="debian" + VERSION_ID=$(awk -F= '/^VERSION_ID=/ {print $2}' /etc/os-release) + NUMERIC_VERSION=$(echo ${VERSION_ID} | tr -d '"') + MINT_MAJOR=${NUMERIC_VERSION%%.*} + # Mint 22.x => Ubuntu 24.04 => debian2 + if [ "${MINT_MAJOR}" -ge 22 ] + then + DISTRIBUTION="debian2" + fi +fi # 兼容麒麟系统(Kylin/openKylin),使用专用脚本 if [ "${DISTRIBUTION}" == "kylin" ] || [ "${DISTRIBUTION}" == "openkylin" ] then