Change ThirdParty to compile the latest _released_ swak4Foam

--HG--
branch : bgschaid/minorAdditionsBranch
This commit is contained in:
Bernhard Gschaider 2013-08-21 17:52:20 +02:00
parent 51a28461e9
commit 8643a879fa

View file

@ -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 ""