Skip to content

Commit 9e41e2c

Browse files
protections for sourcing files
1 parent 648d801 commit 9e41e2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DATA/common/setenv_calib.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
# if they are not explicitly disabled.
88
# Then, configure data spec according to enabled calibrations
99

10-
source $O2DPG_ROOT/DATA/common/setenv.sh
10+
# used to avoid sourcing this file 2x
11+
SETUP_CALIB=1
12+
13+
# the check on LIST_OF_DETECTORS should ensure that setenv.sh was not called before
14+
[[ -z ${LIST_OF_DETECTORS+z} ]] && source $O2DPG_ROOT/DATA/common/setenv.sh
1115

1216
if [[ $BEAMTYPE != "cosmic" ]] || [[ $FORCECALIBRATIONS == 1 ]] ; then
1317

0 commit comments

Comments
 (0)