mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamPack: enforce presence of .build
This commit is contained in:
24
bin/foamPack
24
bin/foamPack
@ -3,7 +3,7 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -107,15 +107,23 @@ then
|
|||||||
echo "pack manually" 1>&2
|
echo "pack manually" 1>&2
|
||||||
foamPackSource $packDir $packFile
|
foamPackSource $packDir $packFile
|
||||||
else
|
else
|
||||||
echo "pack with git-archive" 1>&2
|
if [ ! -f $packDir/.build ]
|
||||||
( cd $packDir && git archive --format=tar --prefix=$packDir/ HEAD) > $packBase.tar
|
then
|
||||||
|
echo "Error: $packDir/.build does not exists" 1>&2
|
||||||
|
echo " Please update this by running e.g. 'wmakePrintBuild -update' in $packDir" 1>&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
echo "add in time-stamp and lnInclude directories" 1>&2
|
|
||||||
tar cf $packBase.tar2 $packDir/.timeStamp $packDir/.build `find -H $packDir -type d -name lnInclude`
|
|
||||||
tar Af $packBase.tar $packBase.tar2
|
|
||||||
|
|
||||||
echo "gzip tar file" 1>&2
|
echo "pack with git-archive" 1>&2 &&
|
||||||
gzip -c9 $packBase.tar > $packFile
|
( cd $packDir && git archive --format=tar --prefix=$packDir/ HEAD) > $packBase.tar &&
|
||||||
|
|
||||||
|
echo "add in time-stamp and lnInclude directories" 1>&2 &&
|
||||||
|
tar cf $packBase.tar2 $packDir/.timeStamp $packDir/.build `find -H $packDir -type d -name lnInclude` &&
|
||||||
|
tar Af $packBase.tar $packBase.tar2 &&
|
||||||
|
|
||||||
|
echo "gzip tar file" 1>&2 &&
|
||||||
|
gzip -c9 $packBase.tar > $packFile &&
|
||||||
rm -f $packBase.tar $packBase.tar2 2>/dev/null
|
rm -f $packBase.tar $packBase.tar2 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user