2 #------------------------------------------------------------------------------
4 # \\ / F ield | foam-extend: Open Source CFD
6 # \\ / A nd | For copyright notice see file Copyright
8 #------------------------------------------------------------------------------
10 # This file is part of foam-extend.
12 # foam-extend is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation, either version 3 of the License, or (at your
15 # option) any later version.
17 # foam-extend is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
29 # Installation script for local development
32 # Martin Beaudoin, Hydro-Quebec, (2012)
34 #------------------------------------------------------------------------------
36 command -v python
-V >/dev
/null
39 echo "Error: You need to install python in order to run these PyFoam scripts"
43 if [ -z "$PYFOAM_DIR" ]
45 echo "Error: Missing environment variable \$PYFOAM_DIR."
46 echo " Please execute the script ThirdParty/AllMake.stage5 to install PyFoam."
47 echo " Then, make sure to freshen your foam-extend environment by sourcing your main"
48 echo " foam-extend configuration file."
52 pythonVersion
=$
(python
-V 2>&1 |
awk -F ' ' {'print $2'} |
awk -F \.
{'print $1 "." $2'})
56 # pyFoamChangeMixingPlaneBoundary.py
57 cp pyFoamChangeMixingPlaneBoundary.py
$PYFOAM_DIR/bin
58 cp ChangeMixingPlaneBoundary.py
$PYFOAM_DIR/lib
/python
$pythonVersion/site-packages
/PyFoam
/Applications
60 # pyFoamChangeGGIBoundary.py
61 # Same as pyFoamModifyGGIBoundary.py. We just harmonize the name with rest of PyFoam
62 cp pyFoamChangeGGIBoundary.py
$PYFOAM_DIR/bin
63 cp ChangeGGIBoundary.py
$PYFOAM_DIR/lib
/python
$pythonVersion/site-packages
/PyFoam
/Applications
65 # pyFoamInitializeMixingPlane.py
66 cp pyFoamInitMixingPlaneInterface.py
$PYFOAM_DIR/bin
67 cp InitMixingPlaneInterface.py
$PYFOAM_DIR/lib
/python
$pythonVersion/site-packages
/PyFoam
/Applications
69 # pyFoamInitializeGGI.py
70 cp pyFoamInitGgiInterface.py
$PYFOAM_DIR/bin
71 cp InitGgiInterface.py
$PYFOAM_DIR/lib
/python
$pythonVersion/site-packages
/PyFoam
/Applications
73 # pyFoamConvertMixingPlaneBoundaryToNewSyntax.py
74 cp pyFoamConvertMixingPlaneBoundaryToNewSyntax.py
$PYFOAM_DIR/bin
75 cp ConvertMixingPlaneBoundaryToNewSyntax.py
$PYFOAM_DIR/lib
/python
$pythonVersion/site-packages
/PyFoam
/Applications
78 echo ========================================
80 echo ========================================
83 # ----------------------------------------------------------------- end-of-file