Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFOAM-plus
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
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Development
OpenFOAM-plus
Commits
771899f1
Commit
771899f1
authored
5 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
CONFIG: backport of META-INFO information (
#1367
)
parent
b7bea855
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
META-INFO/.gitignore
+9
-0
9 additions, 0 deletions
META-INFO/.gitignore
META-INFO/README.md
+5
-0
5 additions, 0 deletions
META-INFO/README.md
META-INFO/api-info
+2
-0
2 additions, 0 deletions
META-INFO/api-info
bin/foamEtcFile
+72
-2
72 additions, 2 deletions
bin/foamEtcFile
with
88 additions
and
2 deletions
META-INFO/.gitignore
0 → 100644
+
9
−
0
View file @
771899f1
# Do not track build information
build-info
# Do not track time-stamp
time-stamp
# Do not track any manifest files
Manifest.txt
manifest.txt
This diff is collapsed.
Click to expand it.
META-INFO/README.md
0 → 100644
+
5
−
0
View file @
771899f1
# META-INFO
Meta-information is for OpenFOAM internal use only.
(Backport from 1812)
This diff is collapsed.
Click to expand it.
META-INFO/api-info
0 → 100644
+
2
−
0
View file @
771899f1
api=1612
patch=180618
This diff is collapsed.
Click to expand it.
bin/foamEtcFile
+
72
−
2
View file @
771899f1
...
@@ -3,9 +3,11 @@
...
@@ -3,9 +3,11 @@
# ========= |
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / O peration |
# \\ / A nd | Copyright (C) 20
11
-201
6
Open
FOAM Foundation
# \\ / A nd | Copyright (C) 20
08-2011, 2017
-201
8
Open
CFD Ltd.
# \\/ M anipulation |
Copyright (C) 2017-2018 OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# | Copyright (C) 2011-2016 OpenFOAM Foundation
#------------------------------------------------------------------------------
# License
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# <http://www.gnu.org/licenses/>.
...
@@ -63,6 +65,8 @@ options:
...
@@ -63,6 +65,8 @@ options:
-config Add config directory prefix for shell type:
-config Add config directory prefix for shell type:
with -csh* for a config.csh/ prefix
with -csh* for a config.csh/ prefix
with -sh* for a config.sh/ prefix
with -sh* for a config.sh/ prefix
-show-api Print api value from wmake/rules, or meta-info and exit
-show-patch Print patch value from meta-info and exit
-quiet (-q) Suppress all normal output
-quiet (-q) Suppress all normal output
-silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output
-silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output
-help Print the usage
-help Print the usage
...
@@ -184,6 +188,62 @@ setVersion()
...
@@ -184,6 +188,62 @@ setVersion()
}
}
#-------------------------------------------------------------------------------
# The API locations. See wmake/wmakeBuildInfo
rulesFile
=
"
$projectDir
/wmake/rules/General/general"
metaInfoDir
=
"
$projectDir
/META-INFO"
# Get api from rules/General/general
#
# Failure modes:
# - No api information (can't find file etc).
# -> Fatal for building, but could be OK for a stripped down version
#
# Fallback. Get from api-info
#
getApi
()
{
local
value
value
=
"
$(
sed
-ne
'/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}'
$rulesFile
2>/dev/null
)
"
if
[
-z
"
$value
"
]
&&
[
-f
"
$metaInfoDir
/api-info"
]
then
# Fallback. Get from api-info
value
=
"
$(
sed
-ne
's@^ *api *= *\([0-9][0-9]*\).*@\1@p'
$metaInfoDir
/api-info 2>/dev/null
)
"
fi
if
[
-n
"
$value
"
]
then
echo
"
$value
"
else
return
1
fi
}
# Get patch from meta-info / api-info
#
# Failure modes:
# - No patch information (can't find file etc).
#
getPatchLevel
()
{
local
value
# Fallback. Get from api-info
value
=
"
$(
sed
-ne
's@^ *patch *= *\([0-9][0-9]*\).*@\1@p'
$metaInfoDir
/api-info 2>/dev/null
)
"
if
[
-n
"
$value
"
]
then
echo
"
$value
"
else
return
1
fi
}
#-------------------------------------------------------------------------------
optMode
=
ugo
# Default mode is always 'ugo'
optMode
=
ugo
# Default mode is always 'ugo'
unset
shellOutput verboseOutput
unset
shellOutput verboseOutput
unset
optAll optConfig optList optVersion
unset
optAll optConfig optList optVersion
...
@@ -195,6 +255,16 @@ do
...
@@ -195,6 +255,16 @@ do
-h
|
-help
*
)
-h
|
-help
*
)
printHelp
printHelp
;;
;;
-show-api
)
# Show API and exit
getApi
exit
$?
;;
-show-patch
)
# Show patch level and exit
getPatchLevel
exit
$?
;;
-a
|
-all
)
-a
|
-all
)
optAll
=
true
optAll
=
true
unset
shellOutput verboseOutput
unset
shellOutput verboseOutput
...
...
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