ENH: wclean all now finds Allwclean files too (issue #408)

- this may still need more testing, but the basic idea is to find
  directories with 'Allwclean' or 'Make' and process them (once!)
This commit is contained in:
mark
2017-02-21 19:40:35 +01:00
parent 9e2e111518
commit 32a78d12e2

View File

@ -231,16 +231,18 @@ then
exit $?
fi
# For all sub-directories containing a 'Make' directory
for dir in $(find . -type d -name Make)
# For all directories containing a 'Make' directory, or an 'Allwclean' file
for dir in $(find . -name Allwclean -o -name Make)
do
echo ${dir%/*}
done | sort | uniq | while read dir
do
dir=${dir%/*} # Parent directory containing the Make directory
# Use Allwclean if it exists, otherwise wclean
if [ -e "$dir/Allwclean" ]
then
$dir/Allwclean
else
elif [ -d "$dir/Make" ]
then
$0 $dir
fi
done