Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change Linux build script to recognize more supported distributions #5686

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions BuildLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,26 @@ fi

DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release)
VERSION=$(awk -F= '/^VERSION_ID=/ {print $2}' /etc/os-release)
# treat ubuntu as debian
if [ "${DISTRIBUTION}" == "ubuntu" ]
then
DISTRIBUTION="debian"
fi
if [ ! -f ./linux.d/${DISTRIBUTION} ]
# OSLIKE is a space-delineated list of similar distributions
OSLIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')

# Iterate over a list of candidate distribution targets, first match is used
for CANDIDATE in ${DISTRIBUTION} ${OSLIKE}; do
if [ -f ./linux.d/${CANDIDATE} ]
then
TARGET_DISTRO="${CANDIDATE}"
break
fi
done

if [ -z ${TARGET_DISTRO} ]
then
echo "Your distribution does not appear to be currently supported by these build scripts"
exit 1
fi
source ./linux.d/${DISTRIBUTION}

echo "OS distribution is '${DISTRIBUTION}'. Using package dependencies for '${TARGET_DISTRO}'."
source ./linux.d/${TARGET_DISTRO}

echo "FOUND_GTK3=${FOUND_GTK3}"
if [[ -z "${FOUND_GTK3_DEV}" ]]
Expand Down Expand Up @@ -196,4 +205,4 @@ echo "[9/9] Generating Linux app..."
fi
popd
echo "done"
fi
fi
Loading