#!/usr/bin/env bash set -euo pipefail if [[ $# -lt 1 ]]; then echo "Usage: $0 \"Project Name\"" exit 1 fi project_name="$1" if [[ -z "$project_name" ]]; then echo "Project name cannot be empty" exit 1 fi if [[ -d "$project_name" ]]; then echo "Directory already exists: $project_name" exit 1 fi dotnet new console -n "$project_name" dotnet sln add "$project_name"