Skip to content
Open
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
17 changes: 5 additions & 12 deletions distro-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,15 @@
#
# SPDX-License-Identifier: GPL-2.0-only

RELEASE="4.1"
ARCH="$(uname -m)"

# This entry point is so that we can do distro specific changes to the launch.
if [ "$(uname -m)" = "aarch64" ]; then
SETUPSCRIPT="environment-setup-aarch64-pokysdk-linux"
elif [ "$(uname -m)" = "x86_64" ]; then
SETUPSCRIPT="environment-setup-x86_64-pokysdk-linux"
fi
# Search the environment setup script with the higher version number
SETUPSCRIPT="$(find /opt/poky -type f -name environment-setup-${ARCH}-pokysdk-linux 2>/dev/null | sort -r | head -n 1)"

# This entry point is so that we can do distro specific changes to the launch.
if [ -e /opt/poky/${RELEASE}/${SETUPSCRIPT} ]; then
if [ ! -z "${SETUPSCRIPT}" ]; then
# Buildtools has been installed so enable it
. /opt/poky/${RELEASE}/${SETUPSCRIPT} || exit 1
elif [ -e /opt/poky/${RELEASE}/${SETUPSCRIPT} ]; then
# Buildtools(-make) has been installed so enable it
. /opt/poky/${RELEASE}/${SETUPSCRIPT} || exit 1
. ${SETUPSCRIPT} || exit 1
fi

exec "$@"