mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fixup foamPack* scripts
- handle ThirdParty-VERSION properly - handle wmake/utilbin/ location - should the wmake/rules/* really be packed with a binary distribution? I think this is just left over from before.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -41,10 +41,6 @@ SunOS*Gcc*/
|
|||||||
# reinstate wmake/rules that might look like build folders
|
# reinstate wmake/rules that might look like build folders
|
||||||
!wmake/rules/*/
|
!wmake/rules/*/
|
||||||
|
|
||||||
# but do continue to ignore the derived wmake files
|
|
||||||
wmake/rules/*/dirToString
|
|
||||||
wmake/rules/*/wmkdep
|
|
||||||
|
|
||||||
# doxygen generated documentation
|
# doxygen generated documentation
|
||||||
doc/[Dd]oxygen/html
|
doc/[Dd]oxygen/html
|
||||||
doc/[Dd]oxygen/latex
|
doc/[Dd]oxygen/latex
|
||||||
|
|||||||
@ -86,9 +86,10 @@ find -H $packDir \
|
|||||||
-a ! -name "log[0-9]*" \
|
-a ! -name "log[0-9]*" \
|
||||||
-a ! -name "so_locations" \
|
-a ! -name "so_locations" \
|
||||||
| sed \
|
| sed \
|
||||||
-e "\@$packDir/.git/@d" \
|
|
||||||
-e "\@$packDir/lib/@d" \
|
-e "\@$packDir/lib/@d" \
|
||||||
|
-e '\@/\.git/@d' \
|
||||||
-e '\@applications/bin/@d' \
|
-e '\@applications/bin/@d' \
|
||||||
|
-e '\@wmake/utilbin/@d' \
|
||||||
-e '\@/t/@d' \
|
-e '\@/t/@d' \
|
||||||
-e '\@Make[.A-Za-z]*/[^/]*/@d' \
|
-e '\@Make[.A-Za-z]*/[^/]*/@d' \
|
||||||
-e '\@doc/[Dd]oxygen/html@d' \
|
-e '\@doc/[Dd]oxygen/html@d' \
|
||||||
@ -100,7 +101,7 @@ find -H $packDir \
|
|||||||
|
|
||||||
tar czpf $packFile --files-from $tmpFile
|
tar czpf $packFile --files-from $tmpFile
|
||||||
|
|
||||||
if [ $? = 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing $packDir into file $packFile"
|
echo "Finished packing and compressing $packDir into file $packFile"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -41,6 +41,9 @@ then
|
|||||||
fi
|
fi
|
||||||
arch=$1
|
arch=$1
|
||||||
|
|
||||||
|
# base arch (w/o precision, optimization, etc)
|
||||||
|
baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@')
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
timeStamp=$(date +%Y-%m-%d)
|
||||||
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
packFile=${packDir}.${arch}_${timeStamp}.gtgz
|
packFile=${packDir}.${arch}_${timeStamp}.gtgz
|
||||||
@ -73,6 +76,7 @@ dirList=$(
|
|||||||
$packDir/lib/$arch \
|
$packDir/lib/$arch \
|
||||||
$packDir/applications/bin/$arch \
|
$packDir/applications/bin/$arch \
|
||||||
$packDir/wmake/rules \
|
$packDir/wmake/rules \
|
||||||
|
$packDir/wmake/utilbin/$baseArch \
|
||||||
;
|
;
|
||||||
do
|
do
|
||||||
[ -d $dir ] && echo $dir
|
[ -d $dir ] && echo $dir
|
||||||
@ -80,12 +84,12 @@ dirList=$(
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Packing $arch port of $packDir into $packFile"
|
echo "Packing $arch ($baseArch) port of $packDir into $packFile"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
tar czpf $packFile $dirList
|
tar czpf $packFile $dirList
|
||||||
|
|
||||||
if [ $? = 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing file $packFile"
|
echo "Finished packing and compressing file $packFile"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -112,7 +112,7 @@ else
|
|||||||
tar czpf $packFile $packDir/doc/Doxygen/html
|
tar czpf $packFile $packDir/doc/Doxygen/html
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $? = 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing doxygen html into file $packFile"
|
echo "Finished packing doxygen html into file $packFile"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -62,7 +62,7 @@ echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Packing $packDir into $packFile"
|
echo "Packing $packDir source files into $packFile"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
foamPackSource $packDir $packFile
|
foamPackSource $packDir $packFile
|
||||||
|
|||||||
@ -78,19 +78,24 @@ find -H $packDir \
|
|||||||
-a ! -name "log[0-9]*" \
|
-a ! -name "log[0-9]*" \
|
||||||
-a ! -name "libccmio*" \
|
-a ! -name "libccmio*" \
|
||||||
| sed \
|
| sed \
|
||||||
-e "\@$packDir/.git/@d" \
|
|
||||||
-e "\@/.tags/@d" \
|
|
||||||
-e "\@$packDir/lib/@d" \
|
-e "\@$packDir/lib/@d" \
|
||||||
-e "\@libccmio.*/@d" \
|
-e '\@/\.git/@d' \
|
||||||
|
-e '\@/\.tags/@d' \
|
||||||
-e '\@applications/bin/@d' \
|
-e '\@applications/bin/@d' \
|
||||||
|
-e '\@wmake/utilbin/@d' \
|
||||||
-e '\@/t/@d' \
|
-e '\@/t/@d' \
|
||||||
-e '\@/Make[.A-Za-z]*/[^/]*/@d'\
|
-e '\@/Make[.A-Za-z]*/[^/]*/@d'\
|
||||||
-e '\@/platforms/@d' \
|
-e '\@/platforms/@d' \
|
||||||
|
-e '\@libccmio.*/@d' \
|
||||||
> $tmpFile
|
> $tmpFile
|
||||||
|
|
||||||
|
|
||||||
|
# provide some feedback
|
||||||
|
wc $tmpFile | awk '{print "Packing",$1,"files - this could take some time ..."}'
|
||||||
|
|
||||||
tar czpf $packFile --files-from $tmpFile
|
tar czpf $packFile --files-from $tmpFile
|
||||||
|
|
||||||
if [ $? = 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing $packDir into file $packFile"
|
echo "Finished packing and compressing $packDir into file $packFile"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ $# = 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Error: archOptions type expected, exiting"
|
echo "Error: archOptions type expected, exiting"
|
||||||
echo
|
echo
|
||||||
@ -41,16 +41,23 @@ then
|
|||||||
fi
|
fi
|
||||||
archOptions=$1
|
archOptions=$1
|
||||||
arch=${archOptions%%G*} # TODO: works for Gcc only
|
arch=${archOptions%%G*} # TODO: works for Gcc only
|
||||||
arch3264=$(echo "$arch" | sed 's@64@-64@')
|
arch3264=$(echo "$arch" | sed -e 's@64@-64@')
|
||||||
|
|
||||||
echo "archOptions=$archOptions"
|
echo "archOptions=$archOptions"
|
||||||
echo "arch=$arch"
|
echo "arch=$arch"
|
||||||
echo "arch3264=$arch3264"
|
echo "arch3264=$arch3264"
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
timeStamp=$(date +%Y-%m-%d)
|
||||||
packDir=ThirdParty
|
packDir=${WM_THIRD_PARTY_DIR:-ThirdParty}
|
||||||
|
packDir=${packDir##*/}
|
||||||
packFile=${packDir}.${archOptions}_${timeStamp}.gtgz
|
packFile=${packDir}.${archOptions}_${timeStamp}.gtgz
|
||||||
|
|
||||||
|
if [ ! -d $packDir ]
|
||||||
|
then
|
||||||
|
echo "Error: directory $packDir does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# add optional output directory
|
# add optional output directory
|
||||||
if [ -d "$2" ]
|
if [ -d "$2" ]
|
||||||
then
|
then
|
||||||
@ -71,7 +78,7 @@ echo
|
|||||||
|
|
||||||
tar czpf $packFile $dirList
|
tar czpf $packFile $dirList
|
||||||
|
|
||||||
if [ $? = 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing file $packFile"
|
echo "Finished packing and compressing file $packFile"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -32,7 +32,8 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
timeStamp=$(date +%Y-%m-%d)
|
||||||
packDir=ThirdParty
|
packDir=${WM_THIRD_PARTY_DIR:-ThirdParty}
|
||||||
|
packDir=${packDir##*/}
|
||||||
packFile=${packDir}.General_${timeStamp}.gtgz
|
packFile=${packDir}.General_${timeStamp}.gtgz
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
if [ ! -d $packDir ]
|
||||||
@ -62,7 +63,7 @@ echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Packing $packDir into $packFile"
|
echo "Packing $packDir source files into $packFile"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
foamPackSource $packDir $packFile
|
foamPackSource $packDir $packFile
|
||||||
|
|||||||
Reference in New Issue
Block a user