From 3cfef5af91c1abc1b3e043a5ef82ebad5094bc71 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Wed, 15 Jun 2011 17:55:56 +0000 Subject: [PATCH] Cleaning --- Linux/menu.sh | 82 +++++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 48 deletions(-) diff --git a/Linux/menu.sh b/Linux/menu.sh index 78252d5..3aeb7f9 100644 --- a/Linux/menu.sh +++ b/Linux/menu.sh @@ -78,22 +78,23 @@ do echo "------------------------" # 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 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 -# Install creatools as user (no longer as root) // JPR 2/5/2011 - #if [ ! -f /etc/bashrc ] - #then - # export ETC_BASHRC="/etc/bash.bashrc" - #else - # export ETC_BASHRC="/etc/bashrc" - #fi - export ETC_BASHRC=$HOME/.bashrc + if [ -f ETC_BASHRC=$HOME/.bashrc ] + then + export ETC_BASHRC=$HOME/.bashrc + else + if [ -f ETC_BASHRC=$HOME/.profile ] + then + export ETC_BASHRC=$HOME/.profile + fi + fi echo "the curently used Third Party libraries are NOT in $installPrefixThird but in :" grep "installPrefixThird=" $ETC_BASHRC @@ -247,23 +248,23 @@ docgeneration="OFF" # ------------------ - loginUserName="" - while [ "$loginUserName" == "" ] - do + #loginUserName="" + loginUserName=$USER + #while [ "$loginUserName" == "" ] + #do echo "Have a look at the following line to know 'Login User Name'/'Login Group Name'" ls -l menu.sh - echo "Login User Name (mandatory!)" - read loginUserName - echo "you said : [" $loginUserName "]" - done + # echo "Login User Name (mandatory!)" + # read loginUserName + # echo "you said : [" $loginUserName "]" + #done echo echo loginGroupName="" while [ "$loginGroupName" == "" ] do - #echo "Have a look at the following line to know 'Login User Name'/'Login Group Name'" - #echo "Login Group Name (mandatory!)" + echo "Have a look at the following line to know 'Login User Name'/'Login Group Name'" echo "Login Group Name (mandatory!)" read loginGroupName echo "you said : [" $loginGroupName "]" @@ -385,9 +386,11 @@ docgeneration="OFF" echo "---------------------------------------------------------------------" fi echo + echo "==>" echo "==> You HAVE to leave current window to continue!" + echo "==>" read a - kill $PPID + kill -9 $PPID ;; 1.0) @@ -399,24 +402,22 @@ docgeneration="OFF" 1.1) echo "========================== 1.1 " - source scripts/Check-if-root.sh - read a - bash scripts/ThirdParty-install-VTK.sh - read a + #source scripts/Check-if-root.sh + bash scripts/ThirdParty-install-VTK.sh bash scripts/ThirdParty-install-Finalize.sh read a ;; 1.2) echo "========================== 1.2 " - source scripts/Check-if-root.sh + #source scripts/Check-if-root.sh bash scripts/ThirdParty-install-gdcm.sh bash scripts/ThirdParty-install-Finalize.sh ;; 1.3) echo "========================== 1.3 " - source scripts/Check-if-root.sh + #source scripts/Check-if-root.sh bash scripts/ThirdParty-install-ITK.sh bash scripts/ThirdParty-install-Finalize.sh read a @@ -431,9 +432,11 @@ docgeneration="OFF" bash scripts/CreaTools-compile.sh #2.3 bash scripts/CreaTools-install.sh - echo "You HAVE to leave current window to continue!" + echo "==>" + echo "==> You HAVE to leave current window to continue!" + echo "==>" read a - kill $PPID + kill -9 $PPID ;; 2.1) @@ -459,28 +462,11 @@ docgeneration="OFF" 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 ;; 2.3) -# if [ $UID != 0 ] -# then -# echo -# echo "..ERROR.." -# echo "===================================================" -# echo "REMEMBER !" -# echo "" -# echo "YOU NEED TO RUN THIS ONE AS root" -# echo "===================================================" -# echo -# echo -# exit 0 -# fi - echo "========================= 4" bash scripts/CreaTools-install.sh @@ -525,8 +511,8 @@ docgeneration="OFF" echo "===================================" # 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 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 ] @@ -534,7 +520,7 @@ docgeneration="OFF" echo WARNING echo echo "the curently used Third Party libraries are NOT in $installPrefixThird but in :" - grep "installPrefixThird=" /etc/bashrc + grep "installPrefixThird=" $ETC_BASHRC echo "VTK_DIR : " $VTK_DIR echo "ITK_DIR : " $ITK_DIR echo "GDCM_DIR : " $GDCM_DIR -- 2.47.1