Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
f8cae3f4
Commit
f8cae3f4
authored
14 years ago
by
Mark Olesen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add cleanCodeStream to tools/CleanFunctions
parent
70f359bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/tools/CleanFunctions
+26
-10
26 additions, 10 deletions
bin/tools/CleanFunctions
with
26 additions
and
10 deletions
bin/tools/CleanFunctions
+
26
−
10
View file @
f8cae3f4
...
@@ -30,15 +30,14 @@
...
@@ -30,15 +30,14 @@
#cleanTimeDirectories()
#cleanTimeDirectories()
#{
#{
# echo "Cleaning $case case of $application application"
# echo "Cleaning $PWD case"
# TIME_DIRS=`foamInfoExec . $1 -times | sed '1,/constant/d'`
# for time in $(foamInfoExec -times)
# for T in $TIME_DIRS
# do
# do
#
if [ $T != "0" ]
#
# keep 0 and constant directories
#
then
#
[ "$time" = "0" -o "$time" = constant ] || {
# echo "Deleting directory $
T
"
# echo "Deleting directory $
time
"
# rm -rf $
{T}
> /dev/null 2>&1
# rm -rf $
time
> /dev/null 2>&1
#
fi
#
}
# done
# done
# rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
# rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
#}
#}
...
@@ -56,15 +55,32 @@ cleanTimeDirectories()
...
@@ -56,15 +55,32 @@ cleanTimeDirectories()
rm
-rf
./[1-9]
*
./-[1-9]
*
./log ./log.
*
./log-
*
./logSummary.
*
./.fxLock ./
*
.xml ./ParaView
*
./paraFoam
*
./
*
.OpenFOAM
>
/dev/null 2>&1
rm
-rf
./[1-9]
*
./-[1-9]
*
./log ./log.
*
./log-
*
./logSummary.
*
./.fxLock ./
*
.xml ./ParaView
*
./paraFoam
*
./
*
.OpenFOAM
>
/dev/null 2>&1
}
}
#
# Remove codeStream subdirectory if it looks appropriate
#
cleanCodeStream
()
{
if
[
-d
system
-a
-d
codeStream
]
then
rm
-rf
codeStream
>
/dev/null 2>&1
fi
}
cleanCase
()
cleanCase
()
{
{
cleanTimeDirectories
cleanTimeDirectories
cleanCodeStream
rm
-rf
processor
*
>
/dev/null 2>&1
rm
-rf
processor
*
>
/dev/null 2>&1
rm
-rf
probes
*
>
/dev/null 2>&1
rm
-rf
probes
*
>
/dev/null 2>&1
rm
-rf
forces
*
>
/dev/null 2>&1
rm
-rf
forces
*
>
/dev/null 2>&1
rm
-rf
sets
>
/dev/null 2>&1
rm
-rf
sets
>
/dev/null 2>&1
rm
-rf
system/machines
>
/dev/null 2>&1
rm
-rf
system/machines
>
/dev/null 2>&1
if
[
-d
"constant/polyMesh"
]
;
then
if
[
-d
constant/polyMesh
]
then
(
cd
constant/polyMesh
&&
\
(
cd
constant/polyMesh
&&
\
rm
-rf
\
rm
-rf
\
allOwner
*
cell
*
face
*
meshModifiers
*
\
allOwner
*
cell
*
face
*
meshModifiers
*
\
...
@@ -94,7 +110,7 @@ cleanCase()
...
@@ -94,7 +110,7 @@ cleanCase()
removeCase
()
removeCase
()
{
{
echo
"Removing
$
case
case"
echo
"Removing
$
{
1
:-
unknown
}
case"
rm
-rf
$1
rm
-rf
$1
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment