Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
ff81ec8c
Commit
ff81ec8c
authored
Jun 26, 2019
by
Mark OLESEN
Committed by
Andrew Heather
Jun 26, 2019
Browse files
CONFIG: add -no-patch option for foamPackRelease
- if desired to create a tar-file without a _patch value in its name.
parent
36948486
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/tools/foamPackRelease
View file @
ff81ec8c
...
...
@@ -48,6 +48,7 @@ Usage: ${0##*/} [OPTION] commit-ish
options:
-output DIR Specify alternative output directory
-no-modules Exclude submodules
-no-patch Ignore _patch number for the output tar-file
-compress=TYPE Compress with specified type
-tgz Alias for -compress=tgz
-help Print help
...
...
@@ -79,7 +80,7 @@ die()
#-------------------------------------------------------------------------------
outputDir
=
"."
withModules
=
true
unset
skipModules skipPatchNum
unset
gitbase
head
commit compress
while
[
"$#"
-gt
0
]
...
...
@@ -94,7 +95,10 @@ do
shift
;;
-no-modules
)
unset
withModules
skipModules
=
true
;;
-no-patch
)
skipPatchNum
=
true
;;
-compress
=
*
)
compress
=
"
${
1
#*=
}
"
...
...
@@ -187,9 +191,12 @@ echo "Detected api, patch as '$api' and '$patch'" 1>&2
dirPrefix
=
"OpenFOAM-v
${
api
}
"
tarName
=
"OpenFOAM-v
${
api
}
"
if
[
"
${
patch
:-
0
}
"
-gt
0
]
if
[
"
$skipPatchNum
"
=
true
]
then
echo
"Ignoring patch number for output name"
1>&2
elif
[
"
${
patch
:-
0
}
"
-gt
0
]
then
tarName
=
"
${
tarName
}
_
$patch
"
tarName
=
"
${
tarName
}
_
$
{
patch
}
"
fi
echo
1>&2
...
...
@@ -224,7 +231,7 @@ echo 'git ls-tree -r "$head" >> "$outputDir/$manifest"'
#------------------------------------------------------------------------------
# Add in mpdules
if
[
"
$
with
Modules
"
=
true
]
if
[
"
$
skip
Modules
"
!
=
true
]
then
git
--git-dir
=
"
$gitbase
/.git"
ls-tree
"
$head
"
modules/ |
\
while
read
mode gittype sha1 module
...
...
@@ -249,7 +256,7 @@ then
echo
'tar -Af "$outputDir/$tarName.tar" "$outputDir/$tarModule.tar"'
echo
'rm -f "$outputDir/$tarModule.tar"'
echo
"
popd
"
echo
'
popd
'
echo
done
fi
...
...
@@ -263,7 +270,7 @@ echo "echo 'Adding manifest'"
echo
'pushd "$outputDir"'
echo
"tar --append --transform='s|@|/|g' -v -f
\"\$
tarName.tar
\"
\"\$
manifest
\"
"
echo
'rm -f "$manifest"'
echo
"
popd
"
echo
'
popd
'
echo
echo
"# End of creating archive"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment