5 # designed to work on Jenkins
6 # this is a proof of concept script
8 echo
"duneutil version: $DUNEUTILVER"
9 echo
"base qualifiers: $QUAL"
10 echo
"build type: $BUILDTYPE"
11 echo
"workspace: $WORKSPACE"
13 echo
"----------------------------"
14 echo
"ls /grid/fermiapp/products/dune"
15 ls /
grid/fermiapp/products/dune
16 echo
"----------------------------"
17 echo
"ls /cvmfs/dune.opensciencegrid.org/products/dune"
18 ls /cvmfs/dune.opensciencegrid.org/products/dune
19 echo
"----------------------------"
22 # Don't do ifdh build on macos.
24 #if uname | grep -q Darwin; then
25 # if ! echo $QUAL | grep -q noifdh; then
26 # echo "Ifdh build requested on macos. Quitting."
31 # Get number of cores to use.
33 if [ `uname` =
Darwin ]; then
34 #ncores=`sysctl -n hw.ncpu`
35 #ncores=$(( $ncores / 4 ))
40 if [ $ncores -lt 1 ]; then
43 echo
"Building using $ncores cores."
45 if [ `uname` =
Darwin -
a -f /
grid/fermiapp/products/dune/setup_dune_fermiapp.sh ]; then
46 source /
grid/fermiapp/products/dune/setup_dune_fermiapp.sh ||
exit 1
47 elif [ -f /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh ]; then
48 if [ -
x /cvmfs/
grid.cern.ch/util/cvmfs-uptodate ]; then
49 /cvmfs/
grid.cern.ch/util/cvmfs-uptodate /cvmfs/dune.opensciencegrid.org/products
51 source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh ||
exit 1
53 echo
"No setup file found."
57 # Use system git on macos.
59 if ! uname | grep -
q Darwin; then
63 # skip around a version of mrb that does not work on macOS
65 if [ `uname` =
Darwin ]; then
66 if [[
x`which
mrb | grep v1_17_02` !=
x ]]; then
78 rm -rf $WORKSPACE/temp ||
exit 1
81 rm -f $WORKSPACE/copyBack
88 # some shenanigans so we can use getopt v1_1_6
89 if [ `uname` =
Darwin ]; then
91 # 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 || \
93 #ERROR: pull of http://scisoft.fnal.gov/scisoft/packages/getopt/v1_1_6/getopt-1.1.6-d13-x86_64.tar.bz2 failed
97 # tar xf getopt-1.1.6-d13-x86_64.tar.bz2 || exit 1
104 # make sure we get a read-only copy
105 mrb g -
r -t $DUNEUTILVER duneutil ||
exit 1
106 cd $MRB_BUILDDIR ||
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