#!/bin/bash #echo "The script you are running has basename `basename $0`, dirname `dirname $0`" #echo "The present working directory is `pwd`" DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) echo "DIR is "$DIR if [ ! -d "$DIR/FairSoftInst" ]; then mkdir $DIR/FairSoftInst fi if [ ! -d "$DIR/FairRootInst" ]; then mkdir $DIR/FairRootInst fi if [ ! -d "$DIR/FairRootBuild" ]; then mkdir $DIR/FairRootBuild fi # load either Releases/Release Candidates via the branch. Caution we need gcc4.8 or later! #svn co https://github.com/FairRootGroup/FairSoft/branches/RC_jul15 $DIR/FairSoft #svn co https://github.com/FairRootGroup/FairRoot/branches/RC-v-15.07 $DIR/FairRoot # or just by tags #svn co https://github.com/FairRootGroup/FairSoft/tags/jul15p2 $DIR/FairSoft #svn co https://github.com/FairRootGroup/FairRoot/tags/v-15.07 $DIR/FairRoot # or get an older version, perhaps? if [ ! -d "$DIR/FairSoft" ]; then svn co https://github.com/FairRootGroup/FairSoft/tags/mar15p2 $DIR/FairSoft else cd $DIR/FairSoft svn update cd $DIR fi if [ ! -d "$DIR/FairRoot" ]; then svn co https://github.com/FairRootGroup/FairRoot/tags/v-15.03a $DIR/FairRoot else cd $DIR/FairRoot svn update cd $DIR fi # Maybe we want DDS, too? #svn co https://github.com/FairRootGroup/DDS/branches/master $DIR/DDS #svn co https://github.com/FairRootGroup/DDS-topology-editor/branches/master $DIR/DDS-topology-editor #svn co https://github.com/FairRootGroup/DDS-user-manual/branches/master $DIR/DDS-user-manual #svn co https://github.com/FairRootGroup/DDS-web-site/branches/master $DIR/DDS-web-site #First FairSoft - the external packages # write our config file unamestr=`uname` if [[ "$OSTYPE" == "darwin"* ]]; then echo "compiler=Clang" > $DIR/pandafair.conf else echo "compiler=gcc" > $DIR/pandafair.conf fi echo "debug=yes" >> $DIR/pandafair.conf echo "optimize=no" >> $DIR/pandafair.conf echo "geant4_download_install_data_automatic=yes" >> $DIR/pandafair.conf echo "geant4_install_data_from_dir=no" >> $DIR/pandafair.conf echo "build_root6=no" >> $DIR/pandafair.conf echo "build_python=no" >> $DIR/pandafair.conf echo "install_sim=yes" >> $DIR/pandafair.conf echo "SIMPATH_INSTALL=$DIR/FairSoftInst" >> $DIR/pandafair.conf cd $DIR/FairSoft ./configure.sh ../pandafair.conf # now FairRoot export SIMPATH=$DIR/FairSoftInst cd $DIR/FairRootBuild cmake -DCMAKE_INSTALL_PREFIX=$DIR/FairRootInst $DIR/FairRoot make make install export FAIRROOTPATH=$DIR/FairRootInst