#!/bin/bash

mkdir /usr/local/dotnet
cd /usr/local/dotnet

# Core/SDK
wget https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.5.25277.114/dotnet-sdk-10.0.100-preview.5.25277.114-linux-x64.tar.gz
gunzip *gz
tar xvf *tar
rm *tar

# Runtime
wget https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.0-preview.5.25277.114/aspnetcore-runtime-10.0.0-preview.5.25277.114-linux-x64.tar.gz
gunzip *gz
tar xvf *tar
rm *tar

# Linking
ln -fs /usr/local/dotnet/dotnet /usr/bin