Improve check_headers.sh, and fix the errors

This commit is contained in:
Laurent Rineau 2017-09-04 16:06:51 +02:00
parent 25367b9141
commit 984b021574
3 changed files with 2 additions and 16 deletions

View File

@ -11,22 +11,8 @@ for DIR in *; do
cd $DOC_DIR
for DOC_FILE in **/*.h; do
#if the file does not exist in the package
if [ ! -f $PATH_TO_CGAL/$DIR/include/CGAL/$DOC_FILE ]; then
filename=$(basename $DOC_FILE)
cd $PATH_TO_CGAL/
#search in all of CGAL
OK='false'
#use this syntax to avoid subshell creation
#so that the setting of OK is still good after the loop
while read line; do
if [[ $line != *"doc"* ]]; then
OK='true'
fi
done < <(find -name "$filename")
if [ $OK == 'false' ]; then
echo "$DOC_DIR/$DOC_FILE "
fi
cd $PATH_TO_CGAL/$DOC_DIR
if [ ! -f $PATH_TO_CGAL/*/include/CGAL/$DOC_FILE ]; then
echo "$DOC_DIR/$DOC_FILE "
fi
done
cd $PATH_TO_CGAL