]> Creatis software - creaToolsTools.git/blobdiff - Linux/menu.sh
?
[creaToolsTools.git] / Linux / menu.sh
index 05dd4545876c7c2cf3c75b668be201e6e8b5c89e..852f94505bf0b2e28e84286afb67ef2f80046a67 100644 (file)
@@ -55,20 +55,32 @@ do
      source scripts/CreaTools-configure.sh
   fi
   
-  if [ "$suitable" = "NO" ]
+  if [ "$suitable" = "NO" || "$suitable" = "N"  || "$suitable" = "no" || "$suitable" = "n" ]
   then
+  
+  
+
+       
+       
      echo
      echo
      confirm="NO"
      while [ "$confirm" != "YES" ]
      do
+     
+     
         OperatingSystem="XXX"
         while [[ "$OperatingSystem" != "Fedora" && \
                  "$OperatingSystem" != "Ubuntu" && \
+
                 "$OperatingSystem" != "MacOS" ]]
         do
            echo "Operating System : Fedora/Ubuntu/MacOS (default :Fedora!)"
            read OperatingSystem
+           if [ "$OperatingSystem" = "" ]
+           then
+             OperatingSystem="Fedora"
+           fi  
         done
         echo "you said : [" $OperatingSystem "]"
         echo
@@ -129,11 +141,11 @@ do
         sourcesFrom="___"
         while [[ "$sourcesFrom" != "CVS"  && "$sourcesFrom" != "HTML" ]]
         do
-           echo "Where do you want to get source files from : CVS/HTML (default is HTML)"
+           echo "Where do you want to get source files from : CVS/HTML (default is CVS)"
            read sourcesFrom
            if [ "$sourcesFrom" = "" ]
            then
-              sourcesFrom="HTML"
+              sourcesFrom="CVS"
            fi
            echo "you said : [" $sourcesFrom "]"
         done
@@ -157,6 +169,7 @@ do
         echo
         # ------------------
 
+
         loginUserName=""
         while [ "$loginUserName" == "" ]
         do 
@@ -221,7 +234,7 @@ do
         echo "  Where do you want to get source files from : $sourcesFrom"
         if [ $sourcesFrom = CVS ]
         then
-           echo "           CVS User Name                              : $cvsUserName"
+           echo " CVS User Name                              : $cvsUserName"
         fi
         echo "  Login User Name                            : $loginUserName"
         echo "  Login Group Name                           : $loginGroupName"
@@ -229,8 +242,12 @@ do
         echo "  Gdcm version                               : $gdcmVersion"
         echo
         echo
-        echo "Do you confirm your choices : YES/NO ? (default is NO)"
+        echo "Do you confirm your choices : YES/NO ? (default is YES)"
         read confirm
+       if [ "$confirm" = "" ]
+       then
+          confirm=YES
+       fi
    done
 
  # GROS SOUCIS : Ou generer le fichier CreaTools-configure.sh?
@@ -267,27 +284,26 @@ do
   1)
      echo "========================== 1 "
      source scripts/Check-if-root.sh
-     
      sh scripts/ThirdParty-install.sh
      
-     vtkdirVariable=""
-     while [ "$vtkdirVariable" = "" ]
-     do
-        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 "]"
+     vtkdirVariable=""
+     while [ "$vtkdirVariable" = "" ]
+     do
+        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 "]"
 
      #vtkdirVariable=""
      #while [ "$vtkdirVariable" = "" ]
@@ -297,31 +313,31 @@ do
      #done
      #echo "you said [" $vtkdirVariable "]"
           
-     latexCompilerVariable=""
-     while [ "$latexCompilerVariable" = "" ]
-     do
-        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 "]"     
+     latexCompilerVariable=""
+     while [ "$latexCompilerVariable" = "" ]
+     do
+        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 "]"     
 
-     sed -i -e '/.*VTK_DIR*/ d'        /etc/bashrc
-     sed -i -e '/.*LATEX_COMPILER*/ d' /etc/bashrc 
-     echo "export VTK_DIR=$vtkdirVariable" >> /etc/bashrc
-     echo "export LATEX_COMPILER=$latexCompilerVariable" >> /etc/bashrc
-  
-     if [ $sourcesFrom = CVS ]
+#     sed -i -e '/.*VTK_DIR*/ d'        /etc/bashrc
+#     sed -i -e '/.*LATEX_COMPILER*/ d' /etc/bashrc 
+#     echo "export VTK_DIR=$vtkdirVariable" >> /etc/bashrc
+#     echo "export LATEX_COMPILER=$latexCompilerVariable" >> /etc/bashrc
+
+     if [ "$sourcesFrom" = "CVS" ]
      then
         echo "----------------------------------------------------------------------"
         echo OK
@@ -334,16 +350,13 @@ do
         echo "To go on, run again 'sh menu.sh'  in a new window"
         echo "---------------------------------------------------------------------"
         exit 0    
-     fi
-     
-     echo "---------------------------------------------------------"
-     echo OK
-     echo "To go on, run again 'sh menu.sh' as root, in a new window"
-     echo "---------------------------------------------------------"
-     exit 0             
+     fi 
+       
   ;;
 
   2)
+    
+     
      echo "========================== 2" 
      sh scripts/CreaTools-load.sh
   ;;