From 8643a879fa6e1532c0bcdbaf1be3883dbfdf71ef Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Wed, 21 Aug 2013 17:52:20 +0200 Subject: [PATCH] Change ThirdParty to compile the latest _released_ swak4Foam --HG-- branch : bgschaid/minorAdditionsBranch --- ThirdParty/AllMake.stage5 | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ThirdParty/AllMake.stage5 b/ThirdParty/AllMake.stage5 index 93022a415..b07836ff8 100755 --- a/ThirdParty/AllMake.stage5 +++ b/ThirdParty/AllMake.stage5 @@ -59,13 +59,16 @@ echo # In fact, we are basically tracking the head branch from the Mercurial repository # which is also replicated under the Breeder_1.7 section of the Subversion repository # + +SWAK_RELEASE_VERSION=0.2.4 + if [ -z "$SWAK4FOAM_SYSTEM" ] then # Do we need to download the source code? # We choose to put the source code under ./rpmBuild/BUILD prior to compiling. # We will not generate a rpm package, but all ThirdParty source code will be # centralized under the same scratch area - if [ ! -e ./rpmBuild/BUILD/swak4Foam-0.2.0 ]; + if [ ! -e ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION ]; then echo "Checking for a Mercurial client: hg" command -v hg >/dev/null @@ -74,9 +77,9 @@ then echo "Using Mercurial/hg to download the source code for swak4Foam" ( cd ./rpmBuild/BUILD; - hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam-0.2.0; - cd swak4Foam-0.2.0; - hg checkout version_0.2.0 + hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION; + cd swak4Foam-$SWAK_RELEASE_VERSION; + hg checkout version_$SWAK_RELEASE_VERSION ) else echo "Warning: Mercurial/hg is not installed. Switching to an alternate Subversion repository" @@ -84,7 +87,7 @@ then if [ $? -eq 0 ]; then echo "Using Subversion/svn to download the source code for swak4Foam" - (cd ./rpmBuild/BUILD; svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.7/libraries/swak4Foam swak4Foam-0.2.0) + (cd ./rpmBuild/BUILD; svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.7/libraries/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION) else echo "Error: Please install either a Mercurial or Subversion client in order to download the source code for swak4Foam" exit -1 @@ -93,13 +96,14 @@ then # We move the compilation results directly to $FOAM_SITE_APPBIN and $FOAM_SITE_LIBBIN # If you prefer to keep the libraries and tools under $FOAM_USER_LIBBIN and $FOAM_USER_APPBIN, simply # comment out the next two lines - (cd ./rpmBuild/BUILD/swak4Foam-0.2.0; find . -name files | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") - (cd ./rpmBuild/BUILD/swak4Foam-0.2.0; find . -name options | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name files | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name options | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; sed -i.old "s|// #define FOAM_SYMMTENSOR_WORKAROUND|#define FOAM_SYMMTENSOR_WORKAROUND|g" Libraries/swak4FoamParsers/include/swak.H ) # We recompile everything - (cd ./rpmBuild/BUILD/swak4Foam-0.2.0; ./Allwclean; ./Allwmake) + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; ./Allwclean; ./Allwmake) else - echo "The source code for swak4Foam is already present under ./rpmBuild/BUILD/swak4Foam-0.2.0" + echo "The source code for swak4Foam is already present under ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION" echo "Please remove this directory if you want to refresh your installation of swak4Foam" fi echo ""