2014-06-16 16:00:21 +00:00
#!/bin/bash
cd ${0%/*} || exit 1 # run from this directory
2014-10-14 22:27:16 +00:00
echo
if [ ! -z "$EXTEND_BAZAAR_TO_SITE" ]; then
echo "Bazaar stuff installed to $FOAM_SITE_APPBIN and $FOAM_SITE_LIBBIN and will be accessible to everyone. To change this unset variable EXTEND_BAZAAR_TO_SITE"
else
echo "Bazaar stuff installed to $FOAM_USER_APPBIN and $FOAM_USER_LIBBIN and will be accessible only for the current user. To change this set variable EXTEND_BAZAAR_TO_SITE"
fi
echo
setDestination()
{
pkg=$1
if [ ! -z "$EXTEND_BAZAAR_TO_SITE" ]; then
2015-05-15 18:07:49 +00:00
dst="SITE"
wrong="USER"
2014-10-14 22:27:16 +00:00
else
2015-05-15 18:07:49 +00:00
dst="USER"
wrong="SITE"
2014-10-14 22:27:16 +00:00
fi
# remove installation to general binaries
2014-11-17 10:51:47 +00:00
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_LIBBIN/FOAM_${dst}_LIBBIN/g
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_APPBIN/FOAM_${dst}_APPBIN/g
2014-10-14 22:27:16 +00:00
# revert installation to the "other" destination
2014-11-17 10:51:47 +00:00
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_${wrong}_LIBBIN/FOAM_${dst}_LIBBIN/g
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_${wrong}_APPBIN/FOAM_${dst}_APPBIN/g
2014-10-14 22:27:16 +00:00
}
2014-06-16 16:00:21 +00:00
2017-05-12 12:00:22 +00:00
# Install Fluid-Solid Interaction package
if [ ! -d "FluidSolidInteraction" ]; then
wget https://openfoamwiki.net/images/d/d6/Fsi_40.tar.gz
tar zxvf Fsi_40.tar.gz
rm Fsi_40.tar.gz
2014-10-13 23:31:42 +00:00
fi
2014-06-16 16:00:21 +00:00
2017-05-12 12:00:22 +00:00
setDestination FluidSolidInteraction
2014-10-14 22:27:16 +00:00
2014-10-14 21:18:12 +00:00
(
2017-05-12 12:00:22 +00:00
cd FluidSolidInteraction/src
2014-10-14 21:18:12 +00:00
./Allwmake
)
2014-06-16 16:00:21 +00:00
2014-10-13 23:31:42 +00:00
# Install the makeAxialMesh utilitiy
if [ ! -d "MakeAxialMesh" ]; then
svn export svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/utilities/mesh/manipulation/MakeAxialMesh MakeAxialMesh
fi
2014-10-14 22:27:16 +00:00
setDestination MakeAxialMesh
2014-10-13 23:31:42 +00:00
wmake MakeAxialMesh/makeAxialMesh
2014-06-16 16:00:21 +00:00
# ----------------------------------------------------------------- end-of-file