Skip to content

Commit

Permalink
add proper check.sh for csharp
Browse files Browse the repository at this point in the history
syntax is
	./check.sh minimal_test.cs
or just
./check.sh
  • Loading branch information
Soeren Sonnenburg committed Jul 29, 2011
1 parent 37e9718 commit 29575c9
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions examples/undocumented/csharp_modular/check.sh
@@ -0,0 +1,34 @@
#!/bin/bash
if [ -z "${MONO}" ]
then
MONOC=gmcs
MONO=mono
fi

args=$#
if [ $args -gt 1 ]; then
echo "Usage: ./check.sh check all examples.
./check.sh name.cs check one example."
exit 0
fi

export LD_LIBRARY_PATH=../../../src/shogun:../../../src/interfaces/csharp_modular

if [ $args -eq 0 ]; then
#${MONOC} Load.cs
${MONOC} $(ls *.cs | sed 's/Load.cs//')

for filename in $(ls *.cs | sed 's/Load.cs//')
do
${MONOC} $filename ../../../src/interfaces/csharp_modular/*.cs
echo "running ${filename%.cs}.exe .."
${MONO} ${filename%.class}.exe >/dev/null
done
fi

if [ $args -eq 1 ]; then
arg=("$@")
#${MONOC} Load.cs
${MONOC} ${arg[0]} ../../../src/interfaces/csharp_modular/*.cs
${MONO} ${arg[0]%.cs}.exe >/dev/null
fi

0 comments on commit 29575c9

Please sign in to comment.