All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
buildLBNE.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 # build lbnecode
4 # use mrb
5 # designed to work on Jenkins
6 # this is a proof of concept script
7 
8 echo "lbnecode version: $LBNEVER"
9 echo "lbneutil version: $LBNEUTIL"
10 echo "base qualifiers: $QUAL"
11 echo "build type: $BUILDTYPE"
12 echo "workspace: $WORKSPACE"
13 
14 ncores=`cat /proc/cpuinfo 2>/dev/null | grep -c -e '^processor'`
15 
16 source /grid/fermiapp/lbne/software/setup_lbne.sh || exit 1
17 
18 setup git || exit 1
19 setup gitflow || exit 1
20 setup mrb || exit 1
21 
22 # skip around a version of mrb that does not work on macOS
23 
24 if [ `uname` = Darwin ]; then
25  if [[ x`which mrb | grep v1_17_02` != x ]]; then
26  unsetup mrb || exit 1
27  setup mrb v1_16_02 || exit 1
28  fi
29 fi
30 
31 export MRB_PROJECT=lbne
32 which mrb
33 
34 set -x
35 rm -rf $WORKSPACE/temp || exit 1
36 mkdir -p $WORKSPACE/temp || exit 1
37 mkdir -p $WORKSPACE/copyBack || exit 1
38 rm -f $WORKSPACE/copyBack/* || exit 1
39 cd $WORKSPACE/temp || exit 1
40 mrb newDev -v $LBNEVER -q $QUAL:$BUILDTYPE || exit 1
41 set +x
42 
43 source localProducts*/setup || exit 1
44 
45 set -x
46 cd $MRB_SOURCE || exit 1
47 # make sure we get a read-only copy
48 mrb g -r -t $LBNEVER lbnecode || exit 1
49 mrb g -r -t $LBNEUTIL lbneutil || exit 1
50 cd $MRB_BUILDDIR || exit 1
51 mrbsetenv || exit 1
52 mrb b -j$ncores || exit 1
53 mrb mp -j$ncores || exit 1
54 mv *.bz2 $WORKSPACE/copyBack/ || exit 1
55 ls -l $WORKSPACE/copyBack/
56 cd $WORKSPACE || exit 1
57 rm -rf $WORKSPACE/temp || exit 1
58 set +x
59 
60 exit 0
then source grid fermiapp products dune setup_dune_fermiapp sh exit else echo No setup file found exit fi setup
process_name opflash particleana ie x
then cvmfs grid cern ch util cvmfs uptodate cvmfs uboone opensciencegrid org products fi source cvmfs uboone opensciencegrid org products setup_uboone sh exit else echo No setup file found exit fi if!uname grep q Darwin
Definition: build_larcv.sh:51
then setup git exit fi setup gitflow exit export MRB_PROJECT
do source
pdgs p
Definition: selectors.fcl:22
then echo Invalid dCache scratch not copying back else ifdh ls
Definition: run_job.sh:111
BEGIN_PROLOG g
then ncores
Definition: build_larcv.sh:26
then shift fi
do cd
g grid
do i e
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project software
esac echo uname r