]> Creatis software - creaToolsTools.git/commitdiff
Automatic generation of 'export' of environment variables in .bashrc
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Tue, 9 Nov 2010 18:21:08 +0000 (18:21 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Tue, 9 Nov 2010 18:21:08 +0000 (18:21 +0000)
Install/scripts/All.sh

index 99ae399eec6602e588bef53c09e2ebcd285e877e..acb38321536964914ed2f954bc860ea97d84040e 100644 (file)
@@ -4,7 +4,7 @@ if [ $# = 0 ]
 then
 echo "Use it as :"
 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
-  echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install
+echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/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 <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
-echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install
+echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/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