From 322905939a3eeb32f350c341fec90399f270a66c Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Tue, 18 Jan 2011 18:43:49 +0000 Subject: [PATCH] more checking --- Linux/menu.sh | 21 ++++++++++++--------- Linux/scripts/ThirdParty-install.sh | 29 ++++++++++++++++------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Linux/menu.sh b/Linux/menu.sh index 42ed409..ba05a03 100644 --- a/Linux/menu.sh +++ b/Linux/menu.sh @@ -63,7 +63,7 @@ do else suitable="NO" fi - + if [ "$suitable" = "NO" ] then echo @@ -83,7 +83,6 @@ do echo echo - # ------------------ echo "Name of the Generation Directory (default is /tmp/myGenerationDir)" read generationdir @@ -255,7 +254,6 @@ do echo "buildType=$buildType" >> $configureFile echo "gdcmVersion=$gdcmVersion" >> $configureFile - # ------------------ # endif 'suitable' fi @@ -268,7 +266,11 @@ do vtkdirVariable="" while [ "$vtkdirVariable" = "" ] do + echo + echo " --------------------------------" echo " Set VTK_DIR environment variable" + echo " --------------------------------" + echo read vtkdirVariable done echo "you said [" $vtkdirVariable "]" @@ -284,7 +286,11 @@ do latexCompilerVariable="" while [ "$latexCompilerVariable" = "" ] do + echo + echo " ---------------------------------------" echo " Set LATEX_COMPILER environment variable" + echo " ---------------------------------------" + echo read latexCompilerVariable done echo "you said [" $latexCompilerVariable "]" @@ -294,20 +300,17 @@ do echo "export VTK_DIR=$vtkdirVariable" >> /etc/bashrc echo "export LATEX_COMPILER=$latexCompilerVariable" >> /etc/bashrc - echo "------------------------------------" + echo "---------------------------------------------------------" echo OK echo "To go on, run again 'sh menu.sh' as root, in a new window" - echo "------------------------------------" + echo "---------------------------------------------------------" exit 0 ;; 2) echo "========================== 3" - sh scripts/CreaTools-load.sh - + sh scripts/CreaTools-load.sh ;; - - 3) echo "========================== 3" diff --git a/Linux/scripts/ThirdParty-install.sh b/Linux/scripts/ThirdParty-install.sh index a64cb5f..3f866ad 100644 --- a/Linux/scripts/ThirdParty-install.sh +++ b/Linux/scripts/ThirdParty-install.sh @@ -29,10 +29,10 @@ source $PWD/scripts/CreaTools-configure.sh echo $gdcmVersion echo --sourcesFrom-- echo $sourcesFrom - echo --scriptDir-- - echo $scriptDir - echo --start_point-- - echo $start_point +# echo --scriptDir-- +# echo $scriptDir +# echo --start_point-- +# echo $start_point echo "------" @@ -40,9 +40,12 @@ scriptDir=$PWD sourcesDir=$generationdir/thirdparty_sources binDir=$generationdir/thirdparty_bin -mkdir $generationdir -mkdir $sourcesDir -mkdir $binDir +if [ ! -e $generationdir ] +then + mkdir $generationdir + mkdir $sourcesDir + mkdir $binDir +fi if [ -f $installPrefix/share/creatools_third_party_library_config.sh ] then @@ -51,6 +54,7 @@ fi # the following stupid test is used at debug time; Please don't remove! if [ true = true ] +#if [ true = false ] then case "$OperatingSystem" in @@ -114,6 +118,7 @@ fi # the following stupid test is used at debug time; Please don't remove! +#if [ true = false ] if [ true = true ] then rm -rf $sourcesDir/VTK* @@ -133,7 +138,6 @@ then fi - if [ $buildType = "Debug" ] then debug="ON" @@ -147,8 +151,9 @@ then libname=VTK dirInstall=$binDir/$libname-Bin dirInstallVTK=$dirInstall - VTK_DIR=$installPrefix/lib/vtk-5.6/ + export VTK_DIR=$installPrefix/lib/vtk-5.6/ cd $dirInstall + cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/ ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/ cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt @@ -162,7 +167,7 @@ if [ true = true ] then libname=gdcm dirInstall=$binDir/$libname-Bin - GDCM_DIR=$installPrefix/lib/gdcm/ + export GDCM_DIR=$installPrefix/lib/gdcm/ mkdir $dirInstall cd $dirInstall cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/ @@ -179,7 +184,7 @@ if [ true = true ] then libname=InsightToolkit-3.20.0 dirInstall=$binDir/$libname-Bin - ITK_DIR=$installPrefix/lib/InsightToolkit/ + export ITK_DIR=$installPrefix/lib/InsightToolkit/ mkdir $dirInstall cd $dirInstall cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/ @@ -219,5 +224,3 @@ sed -i -e '/.*creatools_third_party_library_config.*/ d' /etc/bashrc # - add line 'sh $installPrefix/share/creatools_third_party_library_config.sh' (with accurate value for ???) echo source $installPrefix/share/creatools_third_party_library_config.sh >> /etc/bashrc - - -- 2.45.1