]> Creatis software - creaToolsTools.git/blob - Linux/scripts/ThirdParty-install.sh
re-indent + some fixes.
[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 "--ETC_BASHRC--"
36    echo $ETC_BASHRC  
37 #   echo --sourcesFrom--
38 #   echo $sourcesFrom
39 #   echo --scriptDir--
40 #   echo $scriptDir
41 #   echo --start_point--
42 #   echo $start_point
43    echo "------"
44
45
46 scriptDir=$PWD
47 sourcesDir=$generationdir/thirdparty_sources
48 binDir=$generationdir/thirdparty_bin
49
50 if [ ! -e $generationdir ]
51 then
52    mkdir $generationdir
53    chown $loginUserName  $generationdir
54    chgrp $loginGroupName $generationdir
55 fi
56
57 if [ ! -e $sourcesDir ]
58 then
59    mkdir $sourcesDir
60    #was : (pb on MacOS?)
61    #chown $loginUserName:$loginGroupName $sourcesDir
62    chown $loginUserName  $sourcesDir
63    chgrp $loginGroupName $sourcesDir
64 fi
65
66 if [ ! -e $binDir ]
67 then
68    mkdir $binDir
69    chown $loginUserName  $binDir
70    chgrp $loginGroupName $binDir
71 fi
72
73
74
75 # Third Party base stuff is now installed by ThirdParty-install-Base-Stuff.sh   JPR
76
77
78
79
80 # the following stupid test is used at debug time; Please don't remove!
81 #if [ true = false ]
82 if [ true = true ]
83 then
84
85   rm -rf $sourcesDir/tth*
86
87   cd $sourcesDir
88
89  if [ $OperatingSystem = "MacOS" ]
90    then   
91     # curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
92     # curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz
93     # curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
94     curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
95     # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
96     # tar -xvf VTK-5.6.1.patchCreatis.tar.gz
97     # tar -xvf gdcm_05_Mai_2011.tar.gz
98     # tar -xvf InsightToolkit-3.20.0.tar.gz
99   else
100     # wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
101     # wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz
102     # wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
103     wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
104   
105     # tar -xvzf VTK-5.6.1.patchCreatis.tar.gz
106     #tar -xvzf gdcm_05_Mai_2011.tar.gz
107     #tar -xvzf InsightToolkit-3.20.0.tar.gz
108   fi
109
110 fi
111
112
113 if [ $buildType = "Debug" ]
114 then
115    debug="ON"
116 else
117    debug="OFF"
118 fi
119
120
121 #if [ true = false ]
122 if [ true = true ]
123 then
124   cd $sourcesDir
125  # pourquoi ne copie-t-on plus? JPR
126  cp tth $installPrefixThird/bin
127 fi