5 # designed to work on Jenkins
6 # this is a proof of concept script
8 ls /cvmfs/argoneut.opensciencegrid.org
10 echo
"argoneutcode version: $ARGONEUTVER"
11 echo
"base qualifiers: $QUAL"
12 echo
"build type: $BUILDTYPE"
13 echo
"workspace: $WORKSPACE"
16 #ncores=`sysctl -n hw.ncpu`
17 #ncores=$(( $ncores / 4 ))
22 if [ $ncores -lt 1 ]; then
25 echo
"Building using $ncores cores."
27 #source /grid/fermiapp/products/argoneut/setup_argoneut_fermiapp.sh || exit 1
28 #source /grid/fermiapp/products/argoneut/setup_argoneut.sh || exit 1
30 if [ `uname` =
Darwin -
a -f /
grid/fermiapp/products/argoneut/setup_argoneut_fermiapp.sh ]; then
31 source /
grid/fermiapp/products/argoneut/setup_argoneut_fermiapp.sh ||
exit 1
32 elif [ -f /cvmfs/argoneut.opensciencegrid.org/products/argoneut/setup_argoneut.sh ]; then
33 source /cvmfs/argoneut.opensciencegrid.org/products/argoneut/setup_argoneut.sh ||
exit 1
35 echo
"No setup file found."
40 # skip around a version of mrb that does not work on macOS
43 if [[
x`which
mrb | grep v1_17_02` !=
x ]]; then
59 rm -rf $WORKSPACE/temp ||
exit 1
62 rm -f $WORKSPACE/copyBack
69 # some shenanigans so we can use getopt v1_1_6
70 if [ `uname` =
Darwin ]; then
72 # 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 || \
74 #ERROR: pull of http://scisoft.fnal.gov/scisoft/packages/getopt/v1_1_6/getopt-1.1.6-d13-x86_64.tar.bz2 failed
78 # tar xf getopt-1.1.6-d13-x86_64.tar.bz2 || exit 1
85 # make sure we get a read-only copy
86 mrb g -
r -t $ARGONEUTVER argoneutcode ||
exit 1
91 mv *.bz2 $WORKSPACE/copyBack/ ||
exit 1
92 ls -l $WORKSPACE/copyBack/
94 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