From 264b8fe27720bae6c7ac543ecc850378ec69470d Mon Sep 17 00:00:00 2001 From: Holden Ramsey <68555040+HTRamsey@users.noreply.github.com> Date: Wed, 10 Sep 2025 22:01:37 -0400 Subject: [PATCH] Tools: Support Setup for Linux Mint (#25486) --- Tools/setup/ubuntu.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index b043b133c2..95173279b8 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -54,6 +54,22 @@ if [[ ! -f "${DIR}/${REQUIREMENTS_FILE}" ]]; then return 1 fi +# Linux Mint compatibility: use upstream Ubuntu values +if [ -r /etc/upstream-release/lsb-release ]; then + . /etc/upstream-release/lsb-release + UBUNTU_CODENAME="${DISTRIB_CODENAME:-${UBUNTU_CODENAME:-}}" + UBUNTU_RELEASE="${DISTRIB_RELEASE:-${UBUNTU_RELEASE:-}}" + + lsb_release() { + if [ "$1" = "-cs" ]; then + printf '%s' "$UBUNTU_CODENAME" + elif [ "$1" = "-rs" ]; then + printf '%s' "$UBUNTU_RELEASE" + else + command lsb_release "$@" + fi + } +fi # check ubuntu version # otherwise warn and point to docker?