Fixed bash error when folder is empty

This commit is contained in:
Laurent Saboret 2008-03-26 15:05:26 +00:00
parent bd0f6111dd
commit 407d895703
1 changed files with 2 additions and 1 deletions

View File

@ -115,6 +115,7 @@ if [ \$# -ne 0 ] ; then
compile_and_run \$file compile_and_run \$file
done done
else else
echo "Run all tests."
EOF EOF
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
if [ -n "`grep '\<main\>' $file`" ] ; then if [ -n "`grep '\<main\>' $file`" ] ; then