Skip to content

Commit

Permalink
Solve issues with dotnet and noble.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Aug 14, 2024
1 parent 0a09f82 commit b31ccab
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,33 @@ sub_netcore7(){
$SUDO_CMD apt-get update
$SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends dotnet-sdk-7.0
elif [ "${LINUX_DISTRO}" = "ubuntu" ]; then
UBUNTU_CODENAME=""
CODENAME_FROM_ARGUMENTS=""

# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives)
. /etc/os-release

case ${LINUX_DISTRO} in
debian)
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ]; then
CODENAME="unstable"
else
CODENAME="${VERSION_CODENAME}"
fi
;;
*)
# Ubuntu and its derivatives
if [ -n "${UBUNTU_CODENAME}" ]; then
CODENAME="${UBUNTU_CODENAME}"
fi
;;
esac

if [ "${CODENAME}" = "noble" ]; then
$SUDO_CMD apt-get install -y --no-install-recommends software-properties-common
$SUDO_CMD add-apt-repository ppa:dotnet/backports
fi

$SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends dotnet-sdk-7.0
elif [ "${LINUX_DISTRO}" = "alpine" ]; then
$SUDO_CMD apk add --no-cache dotnet7-sdk
Expand Down

0 comments on commit b31ccab

Please sign in to comment.