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

@ -9,7 +9,7 @@
# coordinator : Utrecht University # coordinator : Utrecht University
# ============================================================================= # =============================================================================
# #
# This script creates a cgal_test script with entries for all .C and .cpp # This script creates a cgal_test script with entries for all .C and .cpp
# files in the current test directory. # files in the current test directory.
VERSION=1.1 VERSION=1.1
@ -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