From fd6701dd0f9eb748e2e4007b259ce0518e2fa0cd Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Tue, 12 Jul 2016 09:07:15 +0100 Subject: [PATCH] foamCleanPolyMesh: No need to warn about missing 'polyMesh' directories --- bin/foamCleanPolyMesh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/bin/foamCleanPolyMesh b/bin/foamCleanPolyMesh index fa97a90431..e4f1eeec9e 100755 --- a/bin/foamCleanPolyMesh +++ b/bin/foamCleanPolyMesh @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -50,7 +50,7 @@ USAGE unset caseDir regionName -# parse a single option +# Parse a single option while [ "$#" -gt 0 ] do case "$1" in @@ -81,12 +81,12 @@ else meshDir=polyMesh fi -# if -case was specified: insist upon 'constant/polyMesh' +# If -case was specified: insist upon 'constant/polyMesh' if [ -n "$caseDir" ] then if [ -d constant/$meshDir ] then - # use constant/polyMesh + # Use constant/polyMesh meshDir=constant/$meshDir else echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2 @@ -95,27 +95,22 @@ then else if [ -d constant/$meshDir ] then - # use constant/polyMesh + # Use constant/polyMesh meshDir=constant/$meshDir elif [ -d $meshDir ] then - # likely already in constant/ - do not adjust anything + # Likely already in constant/ - do not adjust anything : elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ] then - # apparently already within polyMesh/ + # Apparently already within polyMesh/ meshDir=. - else - echo "Error: no appropriate 'polyMesh/' directory found" 1>&2 - exit 1 fi fi -# -# remove files (mesh itself, modifiers, snappyHexMesh ones) and subdirectories +# Remove files (mesh itself, modifiers, snappyHexMesh ones) and subdirectories # also remove .gz versions of the same files -# echo "Cleaning ${caseDir:-.}/$meshDir" 1>&2 for i in \ -- GitLab