]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-load.sh
#3451 OpenMP MacOs
[creaToolsTools.git] / Linux / scripts / CreaTools-load.sh
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Santé)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 #
7 #  This software is governed by the CeCILL-B license under French law and 
8 #  abiding by the rules of distribution of free software. You can  use, 
9 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
10 #  license as circulated by CEA, CNRS and INRIA at the following URL 
11 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
12 #  or in the file LICENSE.txt.
13 #
14 #  As a counterpart to the access to the source code and  rights to copy,
15 #  modify and redistribute granted by the license, users are provided only
16 #  with a limited warranty  and the software's author,  the holder of the
17 #  economic rights,  and the successive licensors  have only  limited
18 #  liability. 
19 #
20 #  The fact that you are presently reading this means that you have had
21 #  knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------  
23
24
25 #!/bin/bash
26
27 # Set all local variables
28
29  if [ -f $PWD/scripts/CreaTools-configure.sh ]
30  then 
31    source $PWD/scripts/CreaTools-configure.sh
32    source $PWD/scripts/CreaTools-names.sh
33
34    echo "------"
35    echo $PWD/scripts/CreaTools-configure.sh
36    echo --generationdir--
37    echo $generationdir
38    echo --docgeneration--
39    echo $docgeneration
40    echo --installPrefix--
41    echo $installPrefix
42    echo --buildType--
43    echo $buildType
44    echo --gdcmVersion--
45    echo $gdcmVersion
46    echo "--ETC_BASHRC--"
47    echo $ETC_BASHRC
48    echo --sourcesFrom--
49    echo $sourcesFrom
50    echo --scriptDir--
51    echo $scriptDir
52    echo --start_point--
53    echo $start_point
54    echo "------"
55
56 else
57    echo
58    echo "..ERROR.."
59    echo "==================================================="
60    echo "REMEMBER !"
61    echo ""
62    echo "YOU NEED TO RUN 'Configure' (0) First !"
63    echo "==================================================="
64    echo
65    echo
66    exit 0
67
68 fi
69
70 if [ ! -e $generationdir ]
71 then
72    mkdir -p $generationdir
73    mkdir -p $generationdir/creatools_source
74    mkdir -p $generationdir/creatools_bin
75 fi
76
77 cd $generationdir
78
79 # --------------------------------
80 #         start_point = 0 : remove everything that was created before
81 #---------------------------------
82 if [ $start_point -le 0 ]
83 then
84 # the following stupid test is used at debug time; Please don't remove!
85 #if [ true = false ]
86 if [ true = true ]
87 then
88   rm -rf creatools_source
89   rm -rf creatools_bin
90   rm -rf ci
91   mkdir -p $generationdir/creatools_source
92 fi
93 fi
94
95 # ----------------------------------
96 #         start_point =  1 : Load all sources
97 #-----------------------------------
98
99
100 if [ $start_point -le 1 ]
101 then
102    if [ true = true ]
103    #if [ true = false ]
104    then
105 #
106       if [ $sourcesFrom = GIT ] || [ $sourcesFrom = GIT-READ-ONLY ];
107       then
108                  ssh-add
109          bash $scriptDir/gitclone.sh $creasource                   $generationdir       $sourcesFrom
110          bash $scriptDir/gitclone.sh $bbtksource                   $generationdir       $sourcesFrom
111          bash $scriptDir/gitclone.sh $creavtksource                    $generationdir   $sourcesFrom 
112          bash $scriptDir/gitclone.sh $creamaracassource            $generationdir       $sourcesFrom 
113          bash $scriptDir/gitclone.sh $creaenvironmentsource        $generationdir       $sourcesFrom 
114          bash $scriptDir/gitclone.sh $creabrukersource             $generationdir       $sourcesFrom 
115          bash $scriptDir/gitclone.sh $creaimagesource              $generationdir       $sourcesFrom 
116          bash $scriptDir/gitclone.sh $creacontourssource           $generationdir       $sourcesFrom 
117          bash $scriptDir/gitclone.sh $crearigidregistrationssource $generationdir       $sourcesFrom 
118          bash $scriptDir/gitclone.sh $bbtkgeditorsource            $generationdir       $sourcesFrom 
119          bash $scriptDir/gitclone.sh $creatoolssource              $generationdir       $sourcesFrom
120          bash $scriptDir/gitclone.sh $creaminitoolssource          $generationdir       $sourcesFrom
121          bash $scriptDir/gitclone.sh $creatoolstoolssource         $generationdir       $sourcesFrom
122  #       bash $scriptDir/cvscheckout.sh $libidosource-ESRF         $generationdir   $cvsUserName
123  #       mv $libidosource-ESRF $libidosource             
124           
125          cd $generationdir/creatools_source/$creasource
126                  git checkout vtk9itk5wx3-macos
127          cd $generationdir/creatools_source/$bbtksource
128                  git checkout vtk9itk5wx3-macos
129          cd $generationdir/creatools_source/$creavtksource
130                  git checkout vtk9itk5wx3-macos
131          cd $generationdir/creatools_source/$creamaracassource
132                  git checkout vtk9itk5wx3-macos
133                  cd $generationdir/creatools_source/$creabrukersource
134                  git checkout vtk9itk5wx3-macos
135          cd $generationdir/creatools_source/$creaimagesource
136                  git checkout vtk9itk5wx3-macos
137          cd $generationdir/creatools_source/$creacontourssource
138                  git checkout vtk9itk5wx3-macos
139          cd $generationdir/creatools_source/$crearigidregistrationssource
140                  git checkout vtk9itk5wx3-macos
141          cd $generationdir/creatools_source/$bbtkgeditorsource
142                  git checkout vtk9itk5wx3-macos
143          cd $generationdir/creatools_source/$creatoolssource
144                  git checkout vtk9itk5wx3-macos
145          cd $generationdir/creatools_source/$creaenvironmentsource
146          git checkout vtk9itk5wx3-macos
147          cd $generationdir/creatools_source/$creaminitoolssource
148          git checkout vtk9itk5wx3-macos
149          cd $generationdir/creatools_source/$creatoolstoolssource
150          git checkout vtk9itk5wx3-macos
151       fi
152
153       if [ $sourcesFrom = HTML ]
154       then
155          cd $generationdir/creatools_source
156          wwwtargz=http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/nightly/
157          wget $wwwtargz/crea.tgz
158          wget $wwwtargz/bbtk.tgz
159          wget $wwwtargz/creaVtk.tgz
160          wget $wwwtargz/creaMaracasVisu.tgz
161          wget $wwwtargz/creaEnvironment.tgz
162          wget $wwwtargz/creaBruker.tgz
163          wget $wwwtargz/creaImageIO.tgz
164          wget $wwwtargz/creaContours.tgz
165          wget $wwwtargz/creaRigidRegistration.tgz
166          wget $wwwtargz/bbtkGEditor.tgz
167          wget $wwwtargz/creaTools.tgz
168          wget $wwwtargz/creaMiniTools.tgz
169          
170  if [ $OperatingSystem = "MacOS" ]
171  then                            
172          curl $wwwtargz/crea.tgz
173          curl $wwwtargz/bbtk.tgz
174          curl $wwwtargz/creaVtk.tgz
175          curl $wwwtargz/creaMaracasVisu.tgz
176          curl $wwwtargz/creaEnvironment.tgz
177          curl $wwwtargz/creaBruker.tgz
178          curl $wwwtargz/creaImageIO.tgz
179          curl $wwwtargz/creaContours.tgz
180          curl $wwwtargz/creaRigidRegistration.tgz
181          curl $wwwtargz/bbtkGEditor.tgz
182          curl $wwwtargz/creaTools.tgz
183          curl $wwwtargz/creaMiniTools.tgz
184  else    
185          tar xvzf crea.tgz
186          tar xvzf bbtk.tgz
187          tar xvzf creaVtk.tgz
188          tar xvzf creaMaracasVisu.tgz
189          tar xvzf creaEnvironment.tgz            
190          tar xvzf creaBruker.tgz
191          tar xvzf creaImageIO.tgz
192          tar xvzf creaContours.tgz
193          tar xvzf creaRigidRegistration.tgz
194          tar xvzf bbtkGEditor.tgz
195          tar xvzf creaTools.tgz
196          tar xvzf creaMiniTools.tgz
197 fi
198          rm -f *.tgz
199       fi
200    fi
201 fi