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
b9f77260
Commit
b9f77260
authored
14 years ago
by
Mark Olesen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: fix wcleanAll, wcleanMachine to work with new platforms/ layout
parent
28e63891
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wmake/wcleanAll
+28
-17
28 additions, 17 deletions
wmake/wcleanAll
wmake/wcleanMachine
+19
-11
19 additions, 11 deletions
wmake/wcleanMachine
with
47 additions
and
28 deletions
wmake/wcleanAll
+
28
−
17
View file @
b9f77260
...
...
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
...
...
@@ -30,33 +30,44 @@
# directories of all machines and delete them.
#
#------------------------------------------------------------------------------
if
[
"
$1
"
=
"-h"
-o
"
$1
"
=
"-help"
]
then
echo
"Usage:
${
0
##*/
}
"
echo
echo
" Remove all object files and *.dep files"
exit
1
fi
usage
()
{
exec
1>&2
while
[
"$#"
-ge
1
]
;
do
echo
"
$1
"
;
shift
;
done
cat
<<
USAGE
usage:
${
0
##*/
}
Remove all object files and *.dep files
[
-d
bin
-a
-d
src
]
||
{
echo
"
${
0
##*/
}
: not in the project top level directory"
USAGE
exit
1
}
for
dir
in
lib bin applications/bin
# parse options
while
[
"$#"
-gt
0
]
do
echo
"Removing non-tools directories from
$dir
/"
if
[
-d
$dir
]
then
find
$dir
-mindepth
1
-type
d
\!
-name
tools | xargs
rm
-rf
fi
case
"
$1
"
in
-h
|
-help
)
usage
;;
*
)
usage
"unknown option/argument: '
$*
'"
;;
esac
done
[
-d
bin
-a
-d
src
]
||
usage
"not in the project top level directory"
echo
"Removing platforms/ subdirectores"
rm
-rf
platforms/
*
echo
"Removing *.dep files"
find
.
-name
'*.dep'
-exec
rm
{}
\;
echo
"Cleaning Make subdirectories"
find
`
find
.
-depth
\(
-name
"Make.[A-Za-z]*"
-o
-name
Make
\)
-type
d
-print
`
-depth
\(
-type
d
!
-name
"*Make.[A-Za-z]*"
!
-name
"*Make"
\)
-exec
rm
-rf
{}
\;
find
.
-depth
\(
-name
Make
-o
-name
"Make.[A-Za-z]*"
\)
-type
d
-print
|
\
xargs
-i
find
'{}'
-mindepth
1
-maxdepth
1
-type
d
-print
|
\
xargs
rm
-rf
echo
"Removing lnInclude and intermediate directories"
find
.
-depth
-type
d
\(
-name
lnInclude
-o
-name
ii_files
-o
-name
Templates.DB
\)
-exec
rm
-rf
{}
\;
...
...
This diff is collapsed.
Click to expand it.
wmake/wcleanMachine
+
19
−
11
View file @
b9f77260
...
...
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
...
...
@@ -33,6 +33,7 @@
#
#------------------------------------------------------------------------------
usage
()
{
exec
1>&2
while
[
"$#"
-ge
1
]
;
do
echo
"
$1
"
;
shift
;
done
cat
<<
USAGE
usage:
${
0
##*/
}
machineType [... machineTypeN]
...
...
@@ -40,32 +41,39 @@ usage: ${0##*/} machineType [... machineTypeN]
Searches the directories below the current directory for the object file
directories of the specified machine type(s) and deletes them
Note:
can also use '-current' for the current value of
\$
WM_OPTIONS
USAGE
exit
1
}
# needs some machine types ... or provide immediate help
if
[
"$#"
-lt
1
-o
"
$1
"
=
"-h"
-o
"
$1
"
=
"-help"
]
then
usage
fi
[
-d
lib
-a
-d
src
]
||
usage
"not in the project top level directory"
[
-d
bin
-a
-d
src
]
||
usage
"not in the project top level directory"
for
machType
do
echo
"Cleaning machine type:
$machType
"
if
[
"
$machType
"
=
"-current"
]
then
machType
=
"
$WM_OPTIONS
"
echo
"Using current =
$machType
"
[
-n
"
$machType
"
]
||
continue
fi
find
`
find
.
-depth
\(
-name
"Make.[A-Za-z]*"
-o
-name
Make
\)
-type
d
-print
`
\
-depth
\(
-type
d
-name
"*
$machType
"
-o
-name
"*
$machType$WM_MPLIB
"
\)
-exec
rm
-r
{}
\;
echo
"Cleaning machine type:
$machType
"
# find . -depth -type d \( -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
find
.
-depth
\(
-name
Make
-o
-name
"Make.[A-Za-z]*"
\)
-type
d
-print
|
\
xargs
-i
find
'{}'
-mindepth
1
-maxdepth
1
\
\(
-type
d
-name
"*
$machType
"
-o
-name
"*
$machType$WM_MPLIB
"
\)
-print
|
xargs
rm
-rf
for
dir
in
lib/
$machType
bin/
$machType
applications/bin/
$machType
do
[
-d
$dir
]
&&
rm
-rf
$dir
done
rm
-rf
platforms/
$machType
done
...
...
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