Files
IPS_W-assignments/W2/calculator/calculator.sh
NikolajDanger ba22cff91f stehau
2022-05-15 12:54:29 +02:00

19 lines
452 B
Bash
Executable File

#!/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 "$@"