6 # designed to work on Jenkins
8 echo
"protoduneana version: $VERSION"
9 echo
"base qualifiers: $QUAL"
10 echo
"build type: $BUILDTYPE"
11 echo
"workspace: $WORKSPACE"
13 # Don't do ifdh build on macos.
15 #if uname | grep -q Darwin; then
16 # if ! echo $QUAL | grep -q noifdh; then
17 # echo "Ifdh build requested on macos. Quitting."
22 # Get number of cores to use.
24 if [ `uname` =
Darwin ]; then
25 #ncores=`sysctl -n hw.ncpu`
26 #ncores=$(( $ncores / 4 ))
31 if [ $ncores -lt 1 ]; then
34 echo
"Building using $ncores cores."
36 # use /grid/fermiapp for macOS builds and cvmfs for Linux
38 echo
"ls /cvmfs/dune.opensciencegrid.org/products/dune/"
39 ls /cvmfs/dune.opensciencegrid.org/products/dune/
42 if [ `uname` =
Darwin -
a -f /
grid/fermiapp/products/dune/setup_dune_fermiapp.sh ]; then
43 source /
grid/fermiapp/products/dune/setup_dune_fermiapp.sh ||
exit 1
44 elif [ -f /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh ]; then
45 if [ -
x /cvmfs/
grid.cern.ch/util/cvmfs-uptodate ]; then
46 /cvmfs/
grid.cern.ch/util/cvmfs-uptodate /cvmfs/dune.opensciencegrid.org/products
48 source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh ||
exit 1
50 echo
"No setup file found."
54 # Use git out of ups except use the system git on macos
56 if ! uname | grep -
q Darwin; then
60 # skip around a version of mrb that does not work on macOS
62 if [ `uname` =
Darwin ]; then
63 if [[
x`which
mrb | grep v1_17_02` !=
x ]]; then
74 rm -rf $WORKSPACE/temp ||
exit 1
77 rm -f $WORKSPACE/copyBack
82 if [ `uname` =
Darwin ]; then
89 until [ $ntries -ge $maxtries ]
92 mrb g -
r -t $VERSION protoduneana &&
break
96 if [ $ntries = $maxtries ]; then
97 echo
"Could not clone protoduneana using mrb g. Quitting."
102 cd $MRB_BUILDDIR ||
exit 1
105 mrb mp -
n protoduneana -- -j$ncores ||
exit 1
107 # add dune_pardata to the manifest
109 manifest=protoduneana-*_MANIFEST.txt
115 PLATFORM=$(uname -
r | grep -o
"el[0-9]"|sed
s'/el/slf/')
118 PLATFORM=$(uname -
r | awk -
F.
'{print "d"$1}')
127 if uname | grep -
q Darwin; then
133 # find our set qualifier from artdaq_core's qualifier
135 SQUAL=`ups active | grep artdaq_core | tr :
'\n' | grep ^
s | awk
'{print $1}'`
136 echo
"Set qualifier from artdaq_core: $SQUAL"
140 echo
"Moving tarballs to copyBack"
142 cd $MRB_BUILDDIR ||
exit 1
144 mv *.bz2 $WORKSPACE/copyBack/ ||
exit 1
146 echo
"Moving manifest to copyBack"
148 manifest=protoduneana-*_MANIFEST.txt
149 if [ -f $manifest ]; then
150 mv $manifest $WORKSPACE/copyBack/ ||
exit 1
152 ls -l $WORKSPACE/copyBack/
154 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
then cp usr lib64 libXmu so sbncode lib fi mrb mp n sbn j $ncores exit manifest
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
then echo File list $list not found else cat $list while read file do echo $file sed s