From 9321273c26f5c7ad9e972f316f72ce7296930909 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Mon, 20 Jun 2016 10:05:23 +0100 Subject: [PATCH] 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 --- wmake/wclean | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wmake/wclean b/wmake/wclean index d71f9d87ac..9f18e9ca4b 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -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 -- GitLab