Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions build-coatjava.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env bash
# build coatjava

set -e
set -u
Expand Down Expand Up @@ -32,6 +30,7 @@ runSpotBugs="no"
downloadMaps="yes"
runUnitTests="no"
useXrootd=false
useCvmfs=false
mvnArgs=()
wgetArgs=()
for xx in $@
Expand All @@ -51,6 +50,7 @@ do
wgetArgs+=(--no-verbose)
;;
--xrootd) useXrootd=true ;;
--cvmfs) useCvmfs=true ;;
-h|--help)
echo "$usage"
exit 2
Expand Down Expand Up @@ -78,6 +78,9 @@ download () {
if $useXrootd; then
xrdcp $1 ./
ret=$?
elif $useCvmfs; then
cp $1 ./
ret=$?
elif command_exists wget ; then
$wget $1
ret=$?
Expand All @@ -97,10 +100,11 @@ download () {
# download the default field maps, as defined in libexec/env.sh:
# (and duplicated in etc/services/reconstruction.yaml):
source libexec/env.sh --no-classpath
if [ $downloadMaps == "yes" ]; then
if [ $cleanBuild == "no" ] && [ $downloadMaps == "yes" ]; then
echo 'Retrieving field maps ...'
webDir=https://clasweb.jlab.org/clas12offline/magfield
if $useXrootd; then webDir=xroot://sci-xrootd.jlab.org//osgpool/hallb/clas12/coatjava/magfield; fi
if $useCvmfs; then webDir=/cvmfs/oasis.opensciencegrid.org/jlab/hallb/clas12/sw/noarch/data/magfield; fi
locDir=etc/data/magfield
mkdir -p $locDir
cd $locDir
Expand Down
Loading