5 # designed to work on Jenkins
7 echo
"uboonedata version: $UBOONEDATA"
8 echo
"larsoft qualifiers: $QUAL"
9 echo
"build type: $BUILDTYPE"
10 echo
"workspace: $WORKSPACE"
12 # Don't do ifdh build on macos.
14 #if uname | grep -q Darwin; then
15 # if ! echo $QUAL | grep -q noifdh; then
16 # echo "Ifdh build requested on macos. Quitting."
21 # Get number of cores to use.
23 if [ `uname` =
Darwin ]; then
24 #ncores=`sysctl -n hw.ncpu`
25 #ncores=$(( $ncores / 4 ))
30 if [ $ncores -lt 1 ]; then
33 echo
"Building using $ncores cores."
35 # Environment setup, uses /grid/fermiapp or cvmfs.
37 echo
"ls /cvmfs/uboone.opensciencegrid.org"
41 if [ -f /
grid/fermiapp/products/
uboone/setup_uboone_bluearc.sh ]; then
43 elif [ -f /cvmfs/
uboone.opensciencegrid.org/products/setup_uboone.sh ]; then
44 if [ -
x /cvmfs/
grid.cern.ch/util/cvmfs-uptodate ]; then
45 /cvmfs/
grid.cern.ch/util/cvmfs-uptodate /cvmfs/
uboone.opensciencegrid.org/products
49 echo
"No setup file found."
53 # Use system git on macos.
55 if ! uname | grep -
q Darwin; then
59 # skip around a version of mrb that does not work on macOS
61 if [ `uname` =
Darwin ]; then
62 if [[
x`which
mrb | grep v1_17_02` !=
x ]]; then
73 rm -rf $WORKSPACE/temp ||
exit 1
76 rm -f $WORKSPACE/copyBack
82 echo
"PRODUCTS=$PRODUCTS"
84 # some shenanigans so we can use getopt v1_1_6
85 if [ `uname` =
Darwin ]; then
87 # curl --fail --silent --location --insecure -O http://scisoft.fnal.gov/scisoft/packages/getopt/v1_1_6/getopt-1.1.6-d13-x86_64.tar.bz2 || \
89 #ERROR: pull of http://scisoft.fnal.gov/scisoft/packages/getopt/v1_1_6/getopt-1.1.6-d13-x86_64.tar.bz2 failed
93 # tar xf getopt-1.1.6-d13-x86_64.tar.bz2 || exit 1
100 # make sure we get a read-only copy
101 mrb g -
r -t $UBOONEDATA uboonedata ||
exit 1
103 cd $MRB_BUILDDIR ||
exit 1
106 mrb mp -
n uboonedata -- -j$ncores ||
exit 1
110 mv *.bz2 $WORKSPACE/copyBack/ ||
exit 1
111 ls -l $WORKSPACE/copyBack/
113 rm -rf $WORKSPACE/temp ||
exit 1
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
then setup git exit fi setup gitflow exit export MRB_PROJECT
then source cvmfs dune opensciencegrid org products dune setup_dune sh exit elif[-f/grid/fermiapp/products/dune/setup_dune_fermiapp.sh]
then echo Invalid dCache scratch not copying back else ifdh ls