2021-03-13 07:53:00 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-09-10 15:33:36 +02:00
|
|
|
check_errors () {
|
|
|
|
grep -q 'error [A-Z]\+[0-9]\+:' check.txt && cat check.txt 1>&2 || cat check.txt
|
|
|
|
rm check.txt
|
|
|
|
}
|
|
|
|
|
2021-09-09 20:20:01 +02:00
|
|
|
case "${PISTON_LANGUAGE}" in
|
|
|
|
csharp)
|
|
|
|
rename 's/$/\.cs/' "$@" # Add .cs extension
|
2021-09-10 15:33:36 +02:00
|
|
|
csc -out:out *.cs > check.txt
|
|
|
|
check_errors
|
2021-09-09 20:20:01 +02:00
|
|
|
;;
|
|
|
|
basic)
|
|
|
|
rename 's/$/\.vb/' "$@" # Add .vb extension
|
2021-09-10 15:33:36 +02:00
|
|
|
vbnc -out:out *.vb > check.txt
|
|
|
|
check_errors
|
2021-09-09 20:20:01 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "How did you get here? (${PISTON_LANGUAGE})"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|