]> Creatis software - creaToolsTools.git/commitdiff
more checking
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 19 Jan 2011 13:51:39 +0000 (13:51 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 19 Jan 2011 13:51:39 +0000 (13:51 +0000)
Linux/menu.sh
Linux/scripts/ThirdParty-install.sh

index 63016e586be47c9d1055b12d40b3b6708485b782..88523740c6cb41b943a0ac819c5a0ea53a26abfc 100644 (file)
@@ -270,12 +270,19 @@ do
      vtkdirVariable=""
      while [ "$vtkdirVariable" = "" ]
      do
-        echo
-       echo " --------------------------------"
-        echo " Set VTK_DIR environment variable"
-       echo " --------------------------------"
-        echo           
-        read vtkdirVariable
+        while [ ! -e "$vtkdirVariable" ]
+        do
+           echo
+          echo " --------------------------------"
+           echo " Set VTK_DIR environment variable"
+          echo " --------------------------------"
+           echo                
+           read vtkdirVariable
+          if [  ! -e "$vtkdirVariable" ]
+          then
+             echo $vtkdirVariable is NOT a valid directory
+          fi
+        done
      done
      echo "you said [" $vtkdirVariable "]"
 
@@ -290,12 +297,19 @@ do
      latexCompilerVariable=""
      while [ "$latexCompilerVariable" = "" ]
      do
-        echo
-       echo " ---------------------------------------"
-        echo " Set LATEX_COMPILER environment variable"
-       echo " ---------------------------------------"
-        echo           
-        read latexCompilerVariable
+        while [ ! -f "$latexCompilerVariable" ]
+        do 
+          echo
+          echo " ---------------------------------------"
+           echo " Set LATEX_COMPILER environment variable"
+          echo " ---------------------------------------"
+           echo                
+           read latexCompilerVariable
+          if [  ! -e "$latexCompilerVariable" ]
+          then
+             echo $latexCompilerVariable is NOT a valid file
+          fi
+       done
      done
      echo "you said [" $latexCompilerVariable "]"     
 
index 3f866ad7067a70a4815952e5b72e270b47b3b5d9..328efba9f74e331e47361e83591b01d94dc1616c 100644 (file)
@@ -27,8 +27,8 @@ source $PWD/scripts/CreaTools-configure.sh
    echo $buildType
    echo --gdcmVersion--
    echo $gdcmVersion
-   echo --sourcesFrom--
-   echo $sourcesFrom
+#   echo --sourcesFrom--
+#   echo $sourcesFrom
 #   echo --scriptDir--
 #   echo $scriptDir
 #   echo --start_point--
@@ -47,10 +47,6 @@ then
    mkdir $binDir
 fi
 
-if [ -f $installPrefix/share/creatools_third_party_library_config.sh ]
-then
-   rm $installPrefix/share/creatools_third_party_library_config.sh
-fi
 
 # the following stupid test is used at debug time; Please don't remove!
 if [ true = true ]
@@ -204,8 +200,18 @@ then
   cp tth $installPrefix/bin
 fi
 
+
 #deal with create creatools_third_party_libraries_config.sh
 
+if [ -f $installPrefix/share/creatools_third_party_library_config.sh ]
+then
+   rm $installPrefix/share/creatools_third_party_library_config.sh
+fi
+
+if [ ! -e $installPrefix/share ]
+then
+   mkdir $installPrefix/share
+fi
 touch     $installPrefix/share/creatools_third_party_library_config.sh
 chmod 755 $installPrefix/share/creatools_third_party_library_config.sh