compiler-discord/docker/csharp/run.sh
2019-06-01 01:21:22 -04:00

10 lines
235 B
Bash

if [ "$EVAL_EXPR" = "true" ]; then
printf %s "$1" | csharp -e
else
mkdir "$CODEDIR" && cd "$CODEDIR"
printf %s "$1" > program.cs
csc program.cs >/dev/null && mono program.exe || true
cd .. && rm -rf "$CODEDIR"
fi