]> Creatis software - creaToolsTools.git/blob - Linux/scripts/ThirdParty-install.sh
Use elementary steps
[creaToolsTools.git] / Linux / scripts / ThirdParty-install.sh
1 #!/bin/bash
2  if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
3  then 
4    echo
5    echo "..ERROR.."
6    echo "==================================================="
7    echo "REMEMBER !"
8    echo ""
9    echo "YOU NEED TO RUN 'Configure' (0) First !"
10    echo "==================================================="
11    echo
12    echo
13    exit 0
14 fi 
15 echo $loginGroupName
16
17 source $PWD/scripts/CreaTools-configure.sh
18
19    echo "------"
20    echo $PWD/scripts/CreaTools-configure.sh
21    echo --generationdir--
22    echo $generationdir
23    echo --corenumber--
24    echo $corenumber   
25    echo --docgeneration--
26    echo $docgeneration
27    echo --installPrefix--
28    echo $installPrefix
29    echo --installPrefixThird--
30    echo $installPrefixThird
31    echo --buildType--
32    echo $buildType
33    echo --gdcmVersion--
34    echo $gdcmVersion
35 #   echo --sourcesFrom--
36 #   echo $sourcesFrom
37 #   echo --scriptDir--
38 #   echo $scriptDir
39 #   echo --start_point--
40 #   echo $start_point
41    echo "------"
42
43
44 scriptDir=$PWD
45 sourcesDir=$generationdir/thirdparty_sources
46 binDir=$generationdir/thirdparty_bin
47
48 if [ ! -e $generationdir ]
49 then
50    mkdir $generationdir
51    chown $loginUserName  $generationdir
52    chgrp $loginGroupName $generationdir
53
54 fi
55 if [ ! -e $sourcesDir ]
56 then
57    mkdir $sourcesDir
58    #was : (pb on MacOS?)
59    #chown $loginUserName:$loginGroupName $sourcesDir
60    chown $loginUserName  $sourcesDir
61    chgrp $loginGroupName $sourcesDir
62 fi
63
64 if [ ! -e $binDir ]
65 then
66    mkdir $binDir
67    chown $loginUserName  $binDir
68    chgrp $loginGroupName $binDir
69 fi
70
71
72
73 # Third Party base stuff is now installed by ThirdParty-install-Base-Stuff.sh   JPR
74
75
76
77
78 # the following stupid test is used at debug time; Please don't remove!
79 #if [ true = false ]
80 if [ true = true ]
81 then
82
83   rm -rf $sourcesDir/tth*
84
85   cd $sourcesDir
86
87  if [ $OperatingSystem = "MacOS" ]
88    then   
89     # curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
90     # curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz
91     # curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
92     curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
93     # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
94     # tar -xvf VTK-5.6.1.patchCreatis.tar.gz
95     # tar -xvf gdcm_05_Mai_2011.tar.gz
96     # tar -xvf InsightToolkit-3.20.0.tar.gz
97   else
98     # wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
99     # wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz
100     # wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
101     wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
102   
103     # tar -xvzf VTK-5.6.1.patchCreatis.tar.gz
104      #tar -xvzf gdcm_05_Mai_2011.tar.gz
105      #tar -xvzf InsightToolkit-3.20.0.tar.gz
106   fi
107
108 fi
109
110
111 if [ $buildType = "Debug" ]
112 then
113    debug="ON"
114 else
115    debug="OFF"
116 fi
117
118
119 #if [ true = false ]
120 if [ true = true ]
121 then
122   cd $sourcesDir
123  # pourquoi ne copie-t-on plus? JPR
124  cp tth $installPrefixThird/bin
125 fi