#!/usr/bin/env bash set -Eeuo pipefail ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)" cd -- "${ROOT}" echo "==> Enforcing repository runtime policy" bash scripts/verify-no-legacy-runtime.sh echo "==> Checking shell scripts" if LC_ALL=C grep -n $'\r' start.sh >/dev/null 2>&1; then echo "ERROR: start.sh contains CR/CRLF line endings" >&2 exit 1 fi chmod +x start.sh fix-port.sh scripts/verify-no-legacy-runtime.sh bash -n start.sh bash -n fix-port.sh bash -n scripts/verify-no-legacy-runtime.sh if command -v shellcheck >/dev/null 2>&1; then shellcheck start.sh fix-port.sh scripts/verify-no-legacy-runtime.sh fi command -v dotnet >/dev/null 2>&1 || { echo "ERROR: dotnet SDK is required" >&2; exit 1; } dotnet --info dotnet build CommonwealthOnline.Server.csproj -c Release --nologo dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release echo "All C# Linux compatibility checks passed."