Skip to content
Browse files

ENH: foamPack: enforce presence of .build

  • Loading branch information...
1 parent 6991a11 commit 1e1a41010a14ee5a411804d3ea4e11bd2861b526 mattijs committed
Showing with 16 additions and 8 deletions.
  1. +16 −8 bin/foamPack
View
24 bin/foamPack
@@ -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 comments on commit 1e1a410

Please sign in to comment.
Something went wrong with that request. Please try again.