From d2b343437d37a8bafcece099c120a44592ab2a62 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Wed, 1 Oct 2025 15:11:45 +0200 Subject: [PATCH] Update setup_dotnet function --- misc/tools.func | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/tools.func b/misc/tools.func index 564402a3..b12b9a64 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -12,10 +12,15 @@ function setup_dotnet() { local NET_VERSION="${NET_VERSION:-8.0}" + DISTRO_CODENAME=$(awk -F= '/^VERSION_CODENAME=/{ print $2 }' /etc/os-release) msg_info "Setup .NET $NET_VERSION" curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg - curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/msprod.list + if [[ "$DISTRO_CODENAME" != "trixie" ]]; then + curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/msprod.list + else + curl -fsSL https://packages.microsoft.com/config/debian/13/prod.list -o /etc/apt/sources.list.d/msprod.list + fi $STD apt-get update $STD apt-get install -y dotnet-sdk-$NET_VERSION msg_ok "Setup .NET ${NET_VERSION}"