This commit is contained in:
NikolajDanger
2022-05-15 12:54:29 +02:00
parent 383332077b
commit ba22cff91f
222 changed files with 23320 additions and 0 deletions

18
W2/calculator/calculator.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -e # Die on first error.
base_dir="$(dirname "$0")"
# Determine location of executable. Does this work on all platforms?
if ! [ "$CALC" ]; then
CALC="$base_dir/bin/Debug/net6.0/Calculator.dll"
if [[ $(uname -o 2> /dev/null) = "Cygwin" ]]; then
CALC="$(cygpath -w "CALC")"
fi
fi
# Verify that .NET is installed.
dotnet --version &> /dev/null || (echo "Could not find dotnet" && exit 1)
dotnet $CALC "$@"