From b09ac6096e0e160da27ebeff3732c465244a7765 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Wed, 15 Jun 2011 14:58:45 +0000 Subject: [PATCH] Fix mistyping --- Linux/menu.sh | 45 ++++++++++++++----- .../scripts/ThirdParty-install-Base-Stuff.sh | 14 +++--- Linux/scripts/ThirdParty-install-Finalize.sh | 14 +++--- Linux/scripts/ThirdParty-install-ITK.sh | 10 +++-- Linux/scripts/ThirdParty-install-gdcm.sh | 24 ++++++---- .../scripts/ThirdParty-install_no_compile.sh | 16 ++++++- 6 files changed, 83 insertions(+), 40 deletions(-) diff --git a/Linux/menu.sh b/Linux/menu.sh index 207d0c3..8ab4e9a 100644 --- a/Linux/menu.sh +++ b/Linux/menu.sh @@ -21,9 +21,12 @@ do if [ $expanded = "YES" ] then - echo " Get and Compile gdcm :.. ......1.1" - echo " Get and Compile itk :.. .......1.2" - echo " Get and Compile vtk :.. .......1.3" + echo " install all base stuff :.. ....1.0" + echo " (cmake, doxygen, graphviz, ...)" + echo " Get and Compile vtk :.. .......1.1" + echo " Get and Compile gdcm :.. ......1.2" + echo " Get and Compile itk :.. .......1.3" + else echo " Install Third Party Libraries :....1 (as root)" fi @@ -205,6 +208,7 @@ then echo echo fi + docgeneration="OFF" # ------------------ @@ -359,7 +363,12 @@ docgeneration="OFF" 1) echo "========================== 1 " source scripts/Check-if-root.sh + bash scripts/ThirdParty-install-Base-Stuff.sh + bash scripts/ThirdParty-install-VTK.sh + bash scripts/ThirdParty-install-gdcm.sh + bash scripts/ThirdParty-install-ITK.sh bash scripts/ThirdParty-install.sh + bash scripts/ThirdParty-install-Finalize.sh if [ "$sourcesFrom" = "CVS" ] then @@ -378,25 +387,37 @@ docgeneration="OFF" read a kill $PPID ;; - + + 1.0) + echo "========================== 1.0 " + source scripts/Check-if-root.sh + bash scripts/ThirdParty-install-Base-Stuff.sh + bash scripts/ThirdParty-install-Finalize.sh + ;; + 1.1) echo "========================== 1.1 " source scripts/Check-if-root.sh - bash scripts/ThirdParty-install-gdcm.sh + bash scripts/ThirdParty-install-VTK.sh + bash scripts/ThirdParty-install-Finalize.sh + read a ;; - + 1.2) echo "========================== 1.2 " - echo "sorry, not yet available" - read a + source scripts/Check-if-root.sh + bash scripts/ThirdParty-install-gdcm.sh + bash scripts/ThirdParty-install-Finalize.sh ;; - + 1.3) echo "========================== 1.3 " - echo "sorry, not yet available" + source scripts/Check-if-root.sh + bash scripts/ThirdParty-install-ITK.sh + bash scripts/ThirdParty-install-Finalize.sh read a - - ;; + ;; + 2) #2.1 diff --git a/Linux/scripts/ThirdParty-install-Base-Stuff.sh b/Linux/scripts/ThirdParty-install-Base-Stuff.sh index c2d69a5..df614d0 100644 --- a/Linux/scripts/ThirdParty-install-Base-Stuff.sh +++ b/Linux/scripts/ThirdParty-install-Base-Stuff.sh @@ -1,4 +1,5 @@ #!/bin/bash + if [ ! -f $PWD/scripts/CreaTools-configure.sh ] then echo @@ -13,6 +14,7 @@ exit 0 fi +source $PWD/scripts/CreaTools-configure.sh scriptDir=$PWD sourcesDir=$generationdir/thirdparty_sources @@ -48,8 +50,8 @@ then # ///\TODO what about SuSE? Debian? Mandriva? Gentoo? case "$OperatingSystem" in Fedora) - yum install cmake -y - yum install cmake-gui -y + yum install cmake -y + yum install cmake-gui -y yum install doxygen -y yum install graphviz -y yum install texlive -y @@ -60,7 +62,7 @@ then yum install qt-devel -y yum install mesa-libOSMesa-devel -y ;; - Ubuntu) + Ubuntu) apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc. apt-get --yes install cmake apt-get --yes install cmake-gui @@ -86,7 +88,7 @@ then port install cmake -y port install doxygen -y port install graphviz -y - # port install tetex -y (replaced by texlive) # cf EED : http://www.creatis.insa-lyon.fr/site/fr/CreatoolsInstallInstructionsv2.0.1MacOsv10.5.6-Developpers + # port install tetex -y (replaced by texlive) # cf EED : http://www.creatis.insa-lyon.fr/site/fr/CreatoolsInstallInstructionsv2.0.1MacOsv10.5.6-Developpers port install texlive -y port install latex2html -y port install wxGTK -y @@ -101,9 +103,9 @@ then port install mesa -y ;; *) - #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem " + echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem " echo " Allowed values are (right now) Fedora, Ubuntu, MacOS " exit 0 ;; - esac + esac fi diff --git a/Linux/scripts/ThirdParty-install-Finalize.sh b/Linux/scripts/ThirdParty-install-Finalize.sh index b12af96..2310b2e 100644 --- a/Linux/scripts/ThirdParty-install-Finalize.sh +++ b/Linux/scripts/ThirdParty-install-Finalize.sh @@ -12,7 +12,7 @@ echo echo exit 0 -fi +fi source $PWD/scripts/CreaTools-configure.sh @@ -47,17 +47,17 @@ echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThir echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh fi - case "$OperatingSystem" in - Fedora) + case "$OperatingSystem" in + Fedora) export ETC_BASHRC=$HOME/.bashrc ;; - Ubuntu) + Ubuntu) export ETC_BASHRC=$HOME/.bashrc ;; - MacOS) - export ETC_BASHRC=$HOME/.profile + MacOS) + export ETC_BASHRC=$HOME/.profile ;; - esac + esac sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC diff --git a/Linux/scripts/ThirdParty-install-ITK.sh b/Linux/scripts/ThirdParty-install-ITK.sh index 9a8f3e3..3d4e271 100644 --- a/Linux/scripts/ThirdParty-install-ITK.sh +++ b/Linux/scripts/ThirdParty-install-ITK.sh @@ -1,4 +1,5 @@ #!/bin/bash + if [ ! -f $PWD/scripts/CreaTools-configure.sh ] then echo @@ -13,6 +14,7 @@ exit 0 fi +source $PWD/scripts/CreaTools-configure.sh scriptDir=$PWD sourcesDir=$generationdir/thirdparty_sources @@ -43,17 +45,17 @@ fi echo "we remove old stuff" rm -rf $sourcesDir/InsightToolkit* - + cd $sourcesDir - + if [ $OperatingSystem = "MacOS" ] - then + then curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( tar -xvf InsightToolkit-3.20.0.tar.gz else wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz fi - + if [ $buildType = "Debug" ] then debug="ON" diff --git a/Linux/scripts/ThirdParty-install-gdcm.sh b/Linux/scripts/ThirdParty-install-gdcm.sh index eda5a5d..12efd37 100644 --- a/Linux/scripts/ThirdParty-install-gdcm.sh +++ b/Linux/scripts/ThirdParty-install-gdcm.sh @@ -1,4 +1,5 @@ #!/bin/bash + if [ ! -f $PWD/scripts/CreaTools-configure.sh ] then echo @@ -11,7 +12,7 @@ echo echo exit 0 -fi +fi source $PWD/scripts/CreaTools-configure.sh @@ -45,19 +46,26 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then mkdir $generationdir - chown $loginUserName:$loginGroupName $generationdir + chown $loginUserName $generationdir + chgrp $loginGroupName $generationdir + fi if [ ! -e $sourcesDir ] then mkdir $sourcesDir + #was : (pb on MacOS?) + #chown $loginUserName:$loginGroupName $sourcesDir + chown $loginUserName $sourcesDir + chgrp $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then mkdir $binDir + chown $loginUserName $binDir + chgrp $loginGroupName $binDir fi - # the following stupid test is used at debug time; Please don't remove! #if [ true = false ] if [ true = true ] @@ -68,19 +76,18 @@ then rm -rf $binDir/gdcm* cd $sourcesDir - + if [ $OperatingSystem = "MacOS" ] - then + then curl http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz - else + else wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz fi - + tar -xvzf gdcm_05_Mai_2011.tar.gz fi - if [ $buildType = "Debug" ] then debug="ON" @@ -88,7 +95,6 @@ else debug="OFF" fi - # the following stupid test is used at debug time; Please don't remove! #if [ true = false ] if [ true = true ] diff --git a/Linux/scripts/ThirdParty-install_no_compile.sh b/Linux/scripts/ThirdParty-install_no_compile.sh index cad923a..b06b71a 100644 --- a/Linux/scripts/ThirdParty-install_no_compile.sh +++ b/Linux/scripts/ThirdParty-install_no_compile.sh @@ -1,5 +1,19 @@ #!/bin/bash + if [ ! -f $PWD/scripts/CreaTools-configure.sh ] + then + echo + echo "..ERROR.." + echo "===================================================" + echo "REMEMBER !" + echo "" + echo "YOU NEED TO RUN 'Configure' (0) First !" + echo "===================================================" + echo + echo + exit 0 +fi + source $PWD/scripts/CreaTools-configure.sh echo "------" @@ -63,11 +77,9 @@ else export ETC_BASHRC=$HOME/.bashrc fi - sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC - # - add line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' (with accurate value for ???) echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC -- 2.45.1