From 6bff3c3cd6fdde87c243147cc11ae117b45ddf69 Mon Sep 17 00:00:00 2001 From: Mihai Mocanu <81875967+MihaiMocanuGit@users.noreply.github.com> Date: Tue, 20 Oct 2026 04:49:37 +0300 Subject: [PATCH] Fix build_linux.sh distro detection when os-release uses single quotes (#16566) Gentoo writes `ID='gentoo'` to /etc/os-release. The script only stripped double quotes, so `-u` looked for `scripts/linux.d/'gentoo'` and exited. Single quotes are now stripped too, for both `ID` and `ID_LIKE`. Fixes #16567 --- build_linux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_linux.sh b/build_linux.sh index cf07d7e9df..b4c03e52ec 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -473,8 +473,8 @@ fi # cmake 4.x compatibility workaround export CMAKE_POLICY_VERSION_MINIMUM=3.5 -DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"') -DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"') +DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d "'\"") +DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d "'\"") # Check for direct distribution match to Ubuntu/Debian if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ] ; then DISTRIBUTION="debian"