From: jean-pierre roux Date: Fri, 18 Feb 2011 13:34:45 +0000 (+0000) Subject: Some more consistency checking... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0cc06dc5ce770c564aa83eaacb4fbe16be2f3975;p=creaToolsTools.git Some more consistency checking... --- diff --git a/Linux/menu.sh b/Linux/menu.sh index f769267..7e4fe05 100644 --- a/Linux/menu.sh +++ b/Linux/menu.sh @@ -397,10 +397,11 @@ do 3) echo "========================== 3" source scripts/CreaTools-configure.sh + bash scripts/CreaTools-compile.sh # To allow (*very* aware) user to patch code, later - if [ -e $loginUserName $generationdir/creatools_source ] + if [ ! -e $generationdir/creatools_source ] then echo "You probabely made a mistake : " echo "Directory $loginUserName $generationdir/creatools_source not found" @@ -409,7 +410,7 @@ do echo "Fix the mistake!" read a else - chown -R $loginUserName $generationdir/creatools_source + chown -R $loginUserName $generationdir/creatools_source chgrp -R $loginGroupName $generationdir/creatools_source # Too much time consuming #chown -R $loginUserName $generationdir/creatools_source @@ -418,7 +419,7 @@ do ;; 4) - if [ $UID != 0 ] + if [ $UID != 0 ] then echo echo "..ERROR.." @@ -433,10 +434,15 @@ do fi echo "========================= 4" bash scripts/CreaTools-install.sh - echo - echo "==> Hit any key to close current window" - read a - kill $PPID + if [ $UID != 0 ] + then + echo "You HAVE to leave current window to continue!" + else + echo "==> Hit any key to close current window" + fi + echo "You HAVE to leave current window to continue!" + read a + kill $PPID ;; 5) @@ -448,7 +454,7 @@ do clear echo "===================================" more README.txt - echo + echo echo "==> Hit any key to go on" read a ;; diff --git a/Linux/scripts/CreaTools-compile.sh b/Linux/scripts/CreaTools-compile.sh index e53bc07..2a8f9a3 100644 --- a/Linux/scripts/CreaTools-compile.sh +++ b/Linux/scripts/CreaTools-compile.sh @@ -39,6 +39,22 @@ fi echo $start_point echo "------" +if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ] +then + echo missing $installPrefixThird/share/creatools_third_party_library_config.sh + echo + echo "..ERROR.." + echo "===================================================" + echo "REMEMBER !" + echo "" + echo "YOU NEED TO RUN 'Install Third Party Libraries' (1) FIRST !" + echo "===================================================" + echo + echo "Hit any key to continue" + read a + exit 0 +fi + if [ ! -e $generationdir/creatools_source ] then echo missing $generationdir/creatools_source @@ -54,6 +70,22 @@ fi exit 0 fi + +if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ] +then + echo missing $installPrefixThird/share/creatools_third_party_library_config.sh + echo + echo "..ERROR.." + echo "===================================================" + echo "REMEMBER !" + echo "" + echo "YOU NEED TO RUN 'Load' (2) FIRST !" + echo "===================================================" + echo + echo + exit 0 +fi + cd $generationdir if [ -e creatools_bin ] then diff --git a/Linux/scripts/CreaTools-install.sh b/Linux/scripts/CreaTools-install.sh index 708058f..71bd297 100644 --- a/Linux/scripts/CreaTools-install.sh +++ b/Linux/scripts/CreaTools-install.sh @@ -40,6 +40,7 @@ then sed -i -e '/.*creatools_base_library_config.*/ d' $ETC_BASHRC # modify /etc/bashrc (we cannot modify .bashrc, since we switched as root) # - add line 'bash $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' + echo source $installPrefix/share/creatools_base_library_config.sh >> $ETC_BASHRC else echo