Skip to content

Commit b31ccab

Browse files
committed
Solve issues with dotnet and noble.
1 parent 0a09f82 commit b31ccab

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tools/metacall-environment.sh

+27
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,33 @@ sub_netcore7(){
362362
$SUDO_CMD apt-get update
363363
$SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends dotnet-sdk-7.0
364364
elif [ "${LINUX_DISTRO}" = "ubuntu" ]; then
365+
UBUNTU_CODENAME=""
366+
CODENAME_FROM_ARGUMENTS=""
367+
368+
# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives)
369+
. /etc/os-release
370+
371+
case ${LINUX_DISTRO} in
372+
debian)
373+
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ]; then
374+
CODENAME="unstable"
375+
else
376+
CODENAME="${VERSION_CODENAME}"
377+
fi
378+
;;
379+
*)
380+
# Ubuntu and its derivatives
381+
if [ -n "${UBUNTU_CODENAME}" ]; then
382+
CODENAME="${UBUNTU_CODENAME}"
383+
fi
384+
;;
385+
esac
386+
387+
if [ "${CODENAME}" = "noble" ]; then
388+
$SUDO_CMD apt-get install -y --no-install-recommends software-properties-common
389+
$SUDO_CMD add-apt-repository ppa:dotnet/backports
390+
fi
391+
365392
$SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends dotnet-sdk-7.0
366393
elif [ "${LINUX_DISTRO}" = "alpine" ]; then
367394
$SUDO_CMD apk add --no-cache dotnet7-sdk

0 commit comments

Comments
 (0)