X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fmenu.sh;h=4b5539bbdbba45f41ad7eacc3db513273c7c7e2a;hb=33b96c45be5e651289e60def82b5e14d24cf276d;hp=83b7584eb3e4e986c4afe43be3f0d0dd0b93275b;hpb=05abe3279dd77f37c98a79f508cd2ba9b66ff395;p=creaToolsTools.git diff --git a/Linux/menu.sh b/Linux/menu.sh index 83b7584..4b5539b 100644 --- a/Linux/menu.sh +++ b/Linux/menu.sh @@ -50,25 +50,39 @@ do else suitable="NO" fi + if [ "$suitable" = "YES" ] then source scripts/CreaTools-configure.sh fi - if [ "$suitable" = "NO" ] +# if [ "$suitable" = "NO" || "$suitable" = "N" || "$suitable" = "no" || "$suitable" = "n" ] + if [ "$suitable" = "NO" ] 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 +143,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 +171,7 @@ do echo # ------------------ + loginUserName="" while [ "$loginUserName" == "" ] do @@ -221,7 +236,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 +244,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? @@ -266,28 +285,27 @@ do 1) echo "========================== 1 " -#EED_missing_this_file source scripts/Check-if-root.sh - + 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 +315,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 +352,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 ;;