wclean all: if an Allclean script exists in sub-directories execute otherwise execute wclean

Resolves bug-report http://bugs.openfoam.org/view.php?id=2125
This commit is contained in:
Henry Weller
2016-06-20 10:05:23 +01:00
parent d04ea965e2
commit 7ecb1422ce

View File

@ -224,8 +224,15 @@ then
# For all the sub-directories containing a 'Make' directory
for dir in `find . \( -type d -a -name Make \)`
do
dir=${dir%/Make} # Parent directory - trim /Make from the end
echo $dir
$0 ${dir%/Make} # Parent directory - trim /Make from the end
# If Allwclean exists execute otherwise wclean
if [ -e "$dir/Allwclean" ]
then
$dir/Allwclean
else
$0 $dir
fi
done
fi
fi