7 echo "==================================================="
10 echo "YOU NEED TO RUN THIS ONE AS root"
11 echo "==================================================="
26 echo " Choose what you want to do :"
29 echo " Install Third Party Libraries : 1"
30 echo " Compile the CreaTools : 2"
31 echo " Install the CreaTools : 3"
32 echo " Uninstall the CreaTools : 4"
39 echo "Type in your choice :"
47 while [ "$confirm" != "YES" ]
50 while [[ "$OperatingSystem" != "Fedora" && \
51 "$OperatingSystem" != "Ubuntu" && \
52 "$OperatingSystem" != "MacOS" ]]
54 echo "Operating System : Fedora/Ubuntu/MacOS (mandatory!)"
57 echo "you said : [" $OperatingSystem "]"
64 echo "Name of the Generation Directory (default is /tmp/myGenerationDir)"
66 if [ "$generationdir" = "" ]
68 generationdir="/tmp/myGenerationDir"
70 echo "you said : [" $generationdir "]"
76 echo "Install Prefix : '$generationdir/creatools_install' / '/usr/local' (default is '$generationdir/creatools_install')"
78 if [ "$installPrefix" = "" ]
80 installPrefix="$generationdir/creatools_install"
82 echo "you said : [" $installPrefix "]"
88 while [[ "$docgeneration" != "YES" && "$docgeneration" != "NO" ]]
90 echo "Boolean For Doc Generation : YES/NO (default is NO)"
92 if [ "$docgeneration" = "" ]
96 echo "you said : [" $docgeneration "]"
103 while [[ "$sourcesFrom" != "CVS" && "$sourcesFrom" != "HTML" ]]
105 echo "Where do you want to get source files from : CVS/HTML (default is HTML)"
107 if [ "$sourcesFrom" = "" ]
111 echo "you said : [" $sourcesFrom "]"
118 if [ "$sourcesFrom" = "CVS" ]
120 while [ "$cvsUserName" == "" ]
122 echo "CVS User Name (mandatory!)"
125 echo "you said : [" $cvsUserName "]"
127 cvsUserName="cvsUserNameCannotBeEmpty"
134 while [ "$linuxUserName" == "" ]
136 echo "LINUX/MacOS User Name (mandatory!)"
138 echo "you said : [" $linuxUserName "]"
145 while [[ "$buildType" != "Release" && "$Debug " != "HTML" ]]
147 echo "Build type : Release/Debug (default is Release)"
149 if [ "$buildType" = "" ]
153 echo "you said : [" $buildType "]"
160 while [[ "$gdcmVersion" != "GDCM1" && "$gdcmVersion " != "GDCM2" ]]
162 echo "Gdcm version : GDCM1/GDCM2 (default is GDCM1)"
164 if [ "$gdcmVersion" = "" ]
168 echo "you said : [" $gdcmVersion "]"
175 echo " Operating System : $OperatingSystem"
176 echo " Name of the Generation Directory : $generationdir"
177 echo " Install Prefix : $installPrefix"
178 echo " Boolean For Doc Generation : $docgeneration"
179 echo " Where do you want to get source files from : $sourcesFrom"
180 if [ $sourcesFrom = CVS ]
182 echo " CVS User Name : $cvsUserName"
184 echo " LINUX/MacOS User Name : $linuxUserName"
185 echo " Build type : $buildType"
186 echo " Gdcm version : $gdcmVersion"
189 echo "Do you confirm your choices : YES/NO ? (default is NO)"
194 # GROS SOUCIS : Ou creer le fichier CreaTools-configure.sh?
195 # dans $generationdir/creatools_bin ?
196 # -> il n'est pas encore cree !
197 # dans ./Linux/scripts?
200 configureFile="scripts/CreaTools-configure.sh"
202 echo "#!/bin/sh" >> $configureFile
203 echo "OperatingSystem=$OperatingSystem" >> $configureFile
204 echo "generationdir=$generationdir" >> $configureFile
205 echo "installPrefix=$installPrefix" >> $configureFile
206 echo "docgeneration=$docgeneration" >> $configureFile
207 echo "sourcesFrom=$sourcesFrom" >> $configureFile
208 echo "cvsUserName=$cvsUserName" >> $configureFile
209 echo "linuxUserName=$linuxUserName" >> $configureFile
210 echo "buildType=$buildType" >> $configureFile
211 echo "gdcmVersion=$gdcmVersion" >> $configureFile
219 echo "========================== $i "
220 sh scripts/ThirdParty-install.sh
224 echo "========================== $i"
225 sh scripts/CreaTools-compile.sh
229 echo "========================= $i"
230 sh scripts/CreaTools-install.sh
234 echo "========================= $i"
235 sh scripts/CreaTools-uninstall.sh
243 echo "Your answer must be in {0, 1, 2, 3, 4, 9} (was $i)"