X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=Linux%2Fmenu.sh;h=20eb77991c10888b30bd70f39b2027d802fd96d8;hb=870a2f2378dff596b99196f0013bfaa798e88dcb;hp=a965358a6cd4af655677bb7b6cd653db7b8548f0;hpb=0dc1b0564e7ba236e6a045f0b0904a10f4d792a8;p=creaToolsTools.git diff --git a/Linux/menu.sh b/Linux/menu.sh index a965358..20eb779 100644 --- a/Linux/menu.sh +++ b/Linux/menu.sh @@ -55,24 +55,17 @@ do # WARNING : $installPrefixThird is taken from CreaTools-configure.sh # if user configured without installing third party library, # Last third party library is still in use! JPR - - - + + if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ] then echo WARNING echo if [ ! -f /etc/bashrc ] then - echo - echo "You are probabely running under UBUNTU OS ?" - echo "Troubles expected! (Hope NO!)" - echo - echo "Hit any key to continue" - read a - echo export ETC_BASHRC="/etc/bash.bashrc" + export ETC_BASHRC="/etc/bash.bashrc" else - echo export ETC_BASHRC="/etc/bashrc" + export ETC_BASHRC="/etc/bashrc" fi echo "the curently used Third Party libraries are NOT in $installPrefixThird but in :" @@ -148,7 +141,6 @@ do echo # ------------------ - installPrefix="___" echo "Install Prefix for CreaTools : '$generationdir/creatools_install' / '/usr/local' (default is '$generationdir/creatools_install')" read installPrefix @@ -405,19 +397,29 @@ do 3) echo "========================== 3" source scripts/CreaTools-configure.sh + bash scripts/CreaTools-compile.sh # To allow (*very* aware) user to patch code, later - - chown -R $loginUserName $generationdir/creatools_source - chgrp -R $loginGroupName $generationdir/creatools_source - # Too much time consuming - #chown -R $loginUserName $generationdir/creatools_source - #chgrp -R $loginGroupName $generationdir/creatools_source + if [ ! -e $generationdir/creatools_source ] + then + echo "You probabely made a mistake : " + echo "Directory $loginUserName $generationdir/creatools_source not found" + echo "Make sure you know the mistake" + echo "Hit any key to continue" + echo "Fix the mistake!" + read a + else + chown -R $loginUserName $generationdir/creatools_source + chgrp -R $loginGroupName $generationdir/creatools_source + # Too much time consuming + #chown -R $loginUserName $generationdir/creatools_source + #chgrp -R $loginGroupName $generationdir/creatools_source + fi ;; 4) - if [ $UID != 0 ] + if [ $UID != 0 ] then echo echo "..ERROR.." @@ -432,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) @@ -447,7 +454,7 @@ do clear echo "===================================" more README.txt - echo + echo echo "==> Hit any key to go on" read a ;; @@ -501,7 +508,7 @@ do ;; *) - echo "Your answer must be in {0, 1, 2, 3, 4, 5, 9} (was [ $i ])" + echo "Your answer must be in {0, 1, 2, 3, 4, 5, 7, 8, 9} (was [ $i ])" ;; esac