Changes between Initial Version and Version 1 of WikiStart/Toolchain/MultipleInstalls

10/21/11 17:34:57 (10 years ago)



  • WikiStart/Toolchain/MultipleInstalls

    v1 v1  
     1This page briefly describes a workflow to develop using multiple Rock installations. 
     3The problem with having multiple Rock installations is to keep them isolated. If you source the from multiple installations, then it might happen that installation A uses files from installation B, for instance because package X is not (yet) installed in installation A. 
     5A workflow to handle these is to do the following: 
     7 * do NOT source any in your shell startup scripts (as e.g. .zshrc or .bashrc) 
     8 * copy/paste the following shell snippet in your shell rc script (.zshrc, .bashrc). WARN: it is only tested for zsh. 
     11function aenv() 
     13  dir=$PWD 
     14  while test "x$dir" != "x/"; do 
     15    if test -f $dir/; then 
     16      echo "sourcing $dir/" 
     17      source $dir/ 
     18      break 
     19    fi 
     20    dir=`dirname $dir` 
     21  done 
     22  if test "x$dir" = "x/"; then 
     23    echo "found no file to load" 
     24  fi 
     29  * after that, every time a shell is created a new directory, it will load the file of the current autoproj installation (if there is one). It means that if you open a new tab in your graphical terminal, and if that tab is in an autoproj installation, the right file gets loaded. 
     30  * if no were ever loaded in a shell, you can just cd in an autoproj installation and do 
     34  * if an is already loaded in a shell, you can cd in another autoproj installation and do (assuming your shell is bash) 
     36exec bash