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
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
echo
# ------------------
+
loginUserName=""
while [ "$loginUserName" == "" ]
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"
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?
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" = "" ]
#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
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
;;