#!/usr/bin/env bash # # Install the .NET SDK locally — no root, no system packages — into ~/.dotnet. # This is the only prerequisite for compiling cBots into .algo files on Linux. # # Usage: ./scripts/install-dotnet.sh [channel] # channel defaults to 8.0 # set -euo pipefail INSTALL_DIR="${DOTNET_ROOT:-$HOME/.dotnet}" CHANNEL="${1:-8.0}" if command -v curl >/dev/null 2>&1; then curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh else wget -qO /tmp/dotnet-install.sh https://dot.net/v1/dotnet-install.sh fi bash /tmp/dotnet-install.sh --channel "$CHANNEL" --install-dir "$INSTALL_DIR" --no-path cat <