CleanFunctions: Check the constant directory exists before cleaning it

This commit is contained in:
Henry Weller
2016-01-09 23:09:08 +00:00
parent 533bae38b2
commit 1eca13aeb9

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -94,11 +94,14 @@ cleanCase()
> /dev/null 2>&1 \ > /dev/null 2>&1 \
) )
fi fi
(cd constant && \ if [ -d constant ]
rm -rf \ then
cellToRegion cellLevel* pointLevel* \ (cd constant && \
> /dev/null 2>&1 \ rm -rf \
) cellToRegion cellLevel* pointLevel* \
> /dev/null 2>&1 \
)
fi
rm -rf constant/tetDualMesh > /dev/null 2>&1 rm -rf constant/tetDualMesh > /dev/null 2>&1