Skip to content
Snippets Groups Projects
Commit cb30c838 authored by mattijs's avatar mattijs
Browse files

ENH: foamPack: enforce presence of .build

parent 46764219
Branches
Tags
No related merge requests found
......@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
......@@ -107,15 +107,23 @@ then
echo "pack manually" 1>&2
foamPackSource $packDir $packFile
else
echo "pack with git-archive" 1>&2
( cd $packDir && git archive --format=tar --prefix=$packDir/ HEAD) > $packBase.tar
if [ ! -f $packDir/.build ]
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
gzip -c9 $packBase.tar > $packFile
echo "pack with git-archive" 1>&2 &&
( 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
fi
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment