Make sure that all bazaar-installations go either to USER or to SITE
This commit is contained in:
parent
9dcb46baa0
commit
42f94e16b2
1 changed files with 34 additions and 3 deletions
|
@ -1,6 +1,34 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
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" | xargs sed -i "" -e s/FOAM_LIBBIN/FOAM_${dst}_LIBBIN/g
|
||||||
|
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_APPBIN/FOAM_${dst}_APPBIN/g
|
||||||
|
|
||||||
|
# revert installation to the "other" destination
|
||||||
|
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_${wrong}_LIBBIN/FOAM_${dst}_LIBBIN/g
|
||||||
|
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_${wrong}_APPBIN/FOAM_${dst}_APPBIN/g
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
# Install Fluid-Structure Interaction package
|
# Install Fluid-Structure Interaction package
|
||||||
if [ ! -d "FluidStructureInteraction" ]; then
|
if [ ! -d "FluidStructureInteraction" ]; then
|
||||||
|
@ -9,6 +37,8 @@ if [ ! -d "FluidStructureInteraction" ]; then
|
||||||
rm Fsi_31.tar.gz
|
rm Fsi_31.tar.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
setDestination FluidStructureInteraction
|
||||||
|
|
||||||
(
|
(
|
||||||
cd FluidStructureInteraction/src
|
cd FluidStructureInteraction/src
|
||||||
./Allwmake
|
./Allwmake
|
||||||
|
@ -20,9 +50,8 @@ if [ ! -d "cfMesh-v1.0" ]; then
|
||||||
tar zxvf cfMesh-v1.0.tgz
|
tar zxvf cfMesh-v1.0.tgz
|
||||||
rm cfMesh-v1.0.tgz
|
rm cfMesh-v1.0.tgz
|
||||||
fi
|
fi
|
||||||
# Change FOAM_LIBBIN to FOAM_USER_LIBBIN
|
|
||||||
find cfMesh-v1.0/ -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_LIBBIN/FOAM_USER_LIBBIN/g
|
setDestination cfMesh-v1.0
|
||||||
find cfMesh-v1.0/ -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_APPBIN/FOAM_USER_APPBIN/g
|
|
||||||
|
|
||||||
(
|
(
|
||||||
cd cfMesh-v1.0
|
cd cfMesh-v1.0
|
||||||
|
@ -34,6 +63,8 @@ if [ ! -d "MakeAxialMesh" ]; then
|
||||||
svn export svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/utilities/mesh/manipulation/MakeAxialMesh MakeAxialMesh
|
svn export svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/utilities/mesh/manipulation/MakeAxialMesh MakeAxialMesh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
setDestination MakeAxialMesh
|
||||||
|
|
||||||
wmake MakeAxialMesh/makeAxialMesh
|
wmake MakeAxialMesh/makeAxialMesh
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|
Reference in a new issue