Release note export to HTML/TXT
[foam-extend-3.2.git] / ThirdParty / LocalDev / Hydro-Quebec / PyFoam / AllMake
blobc2b91b1068e50518147046f1bc576da0c4be1563
1 #!/bin/bash
2 #------------------------------------------------------------------------------
3 # ========= |
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration |
6 # \\ / A nd | For copyright notice see file Copyright
7 # \\/ M anipulation |
8 #------------------------------------------------------------------------------
9 # License
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/>.
25 # Script
26 # AllMake
28 # Description
29 # Installation script for local development
31 # Author:
32 # Martin Beaudoin, Hydro-Quebec, (2012)
34 #------------------------------------------------------------------------------
36 command -v python -V >/dev/null
37 if [ ! $? -eq 0 ];
38 then
39 echo "Error: You need to install python in order to run these PyFoam scripts"
40 exit -1
43 if [ -z "$PYFOAM_DIR" ]
44 then
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."
49 exit -1
52 pythonVersion=$(python -V 2>&1 | awk -F ' ' {'print $2'} | awk -F \. {'print $1 "." $2'})
54 set -x
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
77 set +x
78 echo ========================================
79 echo Done
80 echo ========================================
81 echo
83 # ----------------------------------------------------------------- end-of-file