This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/extend-bazaar/Allwmake
2015-08-07 13:24:54 +01:00

56 lines
1.8 KiB
Bash
Executable file

#!/bin/bash
cd ${0%/*} || exit 1 # run from this directory
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
dst="SITE"
wrong="USER"
else
dst="USER"
wrong="SITE"
fi
# remove installation to general binaries
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
# revert installation to the "other" destination
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
}
# Install Fluid-Structure Interaction package
if [ ! -d "FluidStructureInteraction" ]; then
wget http://openfoamwiki.net/images/5/52/Fsi_31.tar.gz
tar zxvf Fsi_31.tar.gz
rm Fsi_31.tar.gz
fi
setDestination FluidStructureInteraction
(
cd FluidStructureInteraction/src
./Allwmake
)
# 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
setDestination MakeAxialMesh
wmake MakeAxialMesh/makeAxialMesh
# ----------------------------------------------------------------- end-of-file