Skip to content

Instantly share code, notes, and snippets.

@NotFounds
Last active May 7, 2017 15:50
Show Gist options
  • Save NotFounds/c69b9a6098c6d65c882bf8cbe02063a6 to your computer and use it in GitHub Desktop.
Save NotFounds/c69b9a6098c6d65c882bf8cbe02063a6 to your computer and use it in GitHub Desktop.
Usage: $csr foo.cs in in1 ...
#!/bin/sh
mcs -r:System.Numerics $1 -out:out.exe
if [ "$?" -eq 1 ]; then
exit 1
fi
shift
if [ "$1" == "" ]; then
{ time mono out.exe ; }
if [ "$?" -eq 1 ]; then
rm out.exe
exit 1
fi
rm out.exe
exit 0
fi
while [ "$1" != "" ]
do
{ time mono out.exe < $1 ; }
if [ "$?" -eq 1 ]; then
rm out.exe
exit 1
fi
echo "------------------------------"
shift
done
rm out.exe
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment