Allow compilation on distributions based on Ubuntu/Debian (#8625)

* Update BuildLinux.sh

* Update BuildLinux.sh

* Update BuildLinux.sh
This commit is contained in:
cochcoder 2025-02-28 22:28:12 -05:00 committed by GitHub
parent ad30af74dc
commit 268601a3da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,10 +78,13 @@ then
exit 0 exit 0
fi fi
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release) DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
# treat ubuntu as debian DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ] # Check for direct distribution match to Ubuntu/Debian
then if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ]; then
DISTRIBUTION="debian"
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]]; then
DISTRIBUTION="debian" DISTRIBUTION="debian"
fi fi
if [ ! -f ./linux.d/${DISTRIBUTION} ] if [ ! -f ./linux.d/${DISTRIBUTION} ]