From: jean-pierre roux Date: Tue, 9 Nov 2010 18:21:08 +0000 (+0000) Subject: Automatic generation of 'export' of environment variables in .bashrc X-Git-Tag: Creatools2-0-3.creaToolsTools2-0-3.17Feb2011~95 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=42865cbbf57622cd32c2aac7736c8386de1b9498;p=creaToolsTools.git Automatic generation of 'export' of environment variables in .bashrc --- diff --git a/Install/scripts/All.sh b/Install/scripts/All.sh index 99ae399..acb3832 100644 --- a/Install/scripts/All.sh +++ b/Install/scripts/All.sh @@ -4,7 +4,7 @@ if [ $# = 0 ] then echo "Use it as :" echo "sh All.sh " - echo "with 'installPrefix' : /usr/local or /creatools_install +echo "with 'installPrefix' : /usr/local or /creatools_install" echo " " echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug" exit 0 @@ -23,7 +23,7 @@ echo "----------" if [ $# != 5 ] then echo "sh All.sh " -echo "with 'installPrefix' : /usr/local or /creatools_install +echo "with 'installPrefix' : /usr/local or /creatools_install" echo " " echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug" exit 0 @@ -109,6 +109,7 @@ then sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName fi + cd $scriptDir # CREA @@ -124,8 +125,6 @@ fi creadll=$generationdir/creatools_bin/creaBin LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH - - # the following stupid test is used at debug time; Please don't remove! #if [ true = false ] @@ -247,5 +246,20 @@ fi # creatoolsdll=$generationdir/creatools_bin/creatoolsBin # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH + + +CREATOOLS_INSTALL_DIR=$installPrefix +sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh +sudo echo export PATH=$PATH:$CREATOOLS_INSTALL_DIR/bin >> $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh +sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$THIRDPARTY_INSTALL_DIR/lib/creatools >> $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh + +# modify .bashrc +# - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???) +sed -i -e 's/.*creatools_base_libraries_config.*/ /g' ~/.bashrc + +# - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???) +echo sh $CREATOOLS_INSTALL_DIR/share/creatools_base_libraries_config.sh >> ~/.bashrc + + # shutdown /s # exit /b