CleanFunctions: Removed deletion of certain file types

A number of file name patterns have been removed from the list of things
that cleanCase deletes. Some patterns related to obsolete files that
OpenFOAM no longer generates, and some were deemed too generic to
delete as they might contain important persistent information.
This commit is contained in:
Will Bainbridge
2020-02-21 11:15:09 +00:00
parent c57ffd2d07
commit afd7a6ca7d
15 changed files with 78 additions and 37 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -29,9 +29,10 @@
#
#------------------------------------------------------------------------------
cleanTimeDirectories()
cleanCase()
{
echo "Cleaning $PWD case"
zeros=""
while [ ${#zeros} -lt 8 ]
do
@ -39,23 +40,14 @@ cleanTimeDirectories()
rm -rf ./${timeDir} ./-${timeDir} > /dev/null 2>&1
zeros="0$zeros"
done
rm -rf ./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* ./*.xml \
./*.dat ./*.eps ./ParaView* ./paraFoam* ./*.OpenFOAM ./*.blockMesh \
./.setSet > /dev/null 2>&1
}
cleanDynamicCode()
{
rm -rf ./[1-9]* ./-[1-9]* ./log ./log.* ./logSummary.* \
./*.OpenFOAM ./*.blockMesh ./*.foam ./.setSet > /dev/null 2>&1
if [ -d system -a -d dynamicCode ]
then
rm -rf dynamicCode > /dev/null 2>&1
fi
}
cleanCase()
{
cleanTimeDirectories
cleanDynamicCode
rm -rf processor* > /dev/null 2>&1
rm -rf jobInfo > /dev/null 2>&1
@ -102,16 +94,6 @@ removeCase()
rm -rf $1
}
cleanSamples()
{
rm -rf ./sets ./samples ./sampleSurfaces > /dev/null 2>&1
}
cleanUcomponents()
{
rm -rf 0/Ux 0/Uy 0/Uz > /dev/null 2>&1
}
cleanApplication()
{
echo "Cleaning $PWD application"