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
|
||||
!wmake/rules/*/
|
||||
|
||||
# but do continue to ignore the derived wmake files
|
||||
wmake/rules/*/dirToString
|
||||
wmake/rules/*/wmkdep
|
||||
|
||||
# doxygen generated documentation
|
||||
doc/[Dd]oxygen/html
|
||||
doc/[Dd]oxygen/latex
|
||||
|
||||
@ -86,9 +86,10 @@ find -H $packDir \
|
||||
-a ! -name "log[0-9]*" \
|
||||
-a ! -name "so_locations" \
|
||||
| sed \
|
||||
-e "\@$packDir/.git/@d" \
|
||||
-e "\@$packDir/lib/@d" \
|
||||
-e '\@/\.git/@d' \
|
||||
-e '\@applications/bin/@d' \
|
||||
-e '\@wmake/utilbin/@d' \
|
||||
-e '\@/t/@d' \
|
||||
-e '\@Make[.A-Za-z]*/[^/]*/@d' \
|
||||
-e '\@doc/[Dd]oxygen/html@d' \
|
||||
@ -100,7 +101,7 @@ find -H $packDir \
|
||||
|
||||
tar czpf $packFile --files-from $tmpFile
|
||||
|
||||
if [ $? = 0 ]
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Finished packing and compressing $packDir into file $packFile"
|
||||
else
|
||||
|
||||
@ -41,6 +41,9 @@ then
|
||||
fi
|
||||
arch=$1
|
||||
|
||||
# base arch (w/o precision, optimization, etc)
|
||||
baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@')
|
||||
|
||||
timeStamp=$(date +%Y-%m-%d)
|
||||
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
packFile=${packDir}.${arch}_${timeStamp}.gtgz
|
||||
@ -73,6 +76,7 @@ dirList=$(
|
||||
$packDir/lib/$arch \
|
||||
$packDir/applications/bin/$arch \
|
||||
$packDir/wmake/rules \
|
||||
$packDir/wmake/utilbin/$baseArch \
|
||||
;
|
||||
do
|
||||
[ -d $dir ] && echo $dir
|
||||
@ -80,12 +84,12 @@ dirList=$(
|
||||
)
|
||||
|
||||
echo
|
||||
echo "Packing $arch port of $packDir into $packFile"
|
||||
echo "Packing $arch ($baseArch) port of $packDir into $packFile"
|
||||
echo
|
||||
|
||||
tar czpf $packFile $dirList
|
||||
|
||||
if [ $? = 0 ]
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Finished packing and compressing file $packFile"
|
||||
else
|
||||
|
||||
@ -112,7 +112,7 @@ else
|
||||
tar czpf $packFile $packDir/doc/Doxygen/html
|
||||
fi
|
||||
|
||||
if [ $? = 0 ]
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Finished packing doxygen html into file $packFile"
|
||||
else
|
||||
|
||||
@ -62,7 +62,7 @@ echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
echo
|
||||
echo "Packing $packDir into $packFile"
|
||||
echo "Packing $packDir source files into $packFile"
|
||||
echo
|
||||
|
||||
foamPackSource $packDir $packFile
|
||||
|
||||
@ -78,19 +78,24 @@ find -H $packDir \
|
||||
-a ! -name "log[0-9]*" \
|
||||
-a ! -name "libccmio*" \
|
||||
| sed \
|
||||
-e "\@$packDir/.git/@d" \
|
||||
-e "\@/.tags/@d" \
|
||||
-e "\@$packDir/lib/@d" \
|
||||
-e "\@libccmio.*/@d" \
|
||||
-e '\@/\.git/@d' \
|
||||
-e '\@/\.tags/@d' \
|
||||
-e '\@applications/bin/@d' \
|
||||
-e '\@wmake/utilbin/@d' \
|
||||
-e '\@/t/@d' \
|
||||
-e '\@/Make[.A-Za-z]*/[^/]*/@d'\
|
||||
-e '\@/platforms/@d' \
|
||||
-e '\@libccmio.*/@d' \
|
||||
> $tmpFile
|
||||
|
||||
|
||||
# provide some feedback
|
||||
wc $tmpFile | awk '{print "Packing",$1,"files - this could take some time ..."}'
|
||||
|
||||
tar czpf $packFile --files-from $tmpFile
|
||||
|
||||
if [ $? = 0 ]
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Finished packing and compressing $packDir into file $packFile"
|
||||
else
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if [ $# = 0 ]
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Error: archOptions type expected, exiting"
|
||||
echo
|
||||
@ -41,16 +41,23 @@ then
|
||||
fi
|
||||
archOptions=$1
|
||||
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 "arch=$arch"
|
||||
echo "arch3264=$arch3264"
|
||||
|
||||
timeStamp=$(date +%Y-%m-%d)
|
||||
packDir=ThirdParty
|
||||
packDir=${WM_THIRD_PARTY_DIR:-ThirdParty}
|
||||
packDir=${packDir##*/}
|
||||
packFile=${packDir}.${archOptions}_${timeStamp}.gtgz
|
||||
|
||||
if [ ! -d $packDir ]
|
||||
then
|
||||
echo "Error: directory $packDir does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add optional output directory
|
||||
if [ -d "$2" ]
|
||||
then
|
||||
@ -71,7 +78,7 @@ echo
|
||||
|
||||
tar czpf $packFile $dirList
|
||||
|
||||
if [ $? = 0 ]
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Finished packing and compressing file $packFile"
|
||||
else
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
timeStamp=$(date +%Y-%m-%d)
|
||||
packDir=ThirdParty
|
||||
packDir=${WM_THIRD_PARTY_DIR:-ThirdParty}
|
||||
packDir=${packDir##*/}
|
||||
packFile=${packDir}.General_${timeStamp}.gtgz
|
||||
|
||||
if [ ! -d $packDir ]
|
||||
@ -62,7 +63,7 @@ echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
echo
|
||||
echo "Packing $packDir into $packFile"
|
||||
echo "Packing $packDir source files into $packFile"
|
||||
echo
|
||||
|
||||
foamPackSource $packDir $packFile
|
||||
|
||||
Reference in New Issue
Block a user