Skip to content

Commit 2c5d4f3

Browse files
authored
Fix syntax checks for shell scripts (#1473)
1 parent d3e6126 commit 2c5d4f3

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

DATA/common/gen_topo_helper_functions.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,37 +104,37 @@ _check_multiple()
104104

105105
has_detectors()
106106
{
107-
_check_multiple has_detector $@
107+
_check_multiple has_detector "$@"
108108
}
109109

110110
has_detectors_qc()
111111
{
112-
_check_multiple has_detector_qc $@
112+
_check_multiple has_detector_qc "$@"
113113
}
114114

115115
has_detectors_calib()
116116
{
117-
_check_multiple has_detector_calib $@
117+
_check_multiple has_detector_calib "$@"
118118
}
119119

120120
has_detectors_reco()
121121
{
122-
_check_multiple has_detector_reco $@
122+
_check_multiple has_detector_reco "$@"
123123
}
124124

125125
has_detectors_ctf()
126126
{
127-
_check_multiple has_detector_ctf $@
127+
_check_multiple has_detector_ctf "$@"
128128
}
129129

130130
has_detectors_flp_processing()
131131
{
132-
_check_multiple has_detector_flp_processing $@
132+
_check_multiple has_detector_flp_processing "$@"
133133
}
134134

135135
workflow_has_parameters()
136136
{
137-
_check_multiple workflow_has_parameter $@
137+
_check_multiple workflow_has_parameter "$@"
138138
}
139139

140140
add_comma_separated()

DATA/common/setenv_calib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SOURCE_GUARD_SETENV_CALIB=1
1414
# define the conditions for each calibration
1515
if has_detector_calib ITS && has_detectors_reco ITS && has_detector_matching PRIMVTX && [[ ! -z "$VERTEXING_SOURCES" ]]; then CAN_DO_CALIB_PRIMVTX_MEANVTX=1; else CAN_DO_CALIB_PRIMVTX_MEANVTX=0; fi
1616
if has_detector_calib TOF && has_detector_reco TOF; then CAN_DO_CALIB_TOF_DIAGNOSTICS=1; CAN_DO_CALIB_TOF_INTEGRATEDCURR=1; else CAN_DO_CALIB_TOF_DIAGNOSTICS=0; CAN_DO_CALIB_TOF_INTEGRATEDCURR=0; fi
17-
if has_detector_calib TOF && has_detector_reco TOF && (( has_detectors_reco ITS TPC && has_detector_matching ITSTPCTOF ) || ( has_detectors_reco ITS TPC TRD && has_detector_matching ITSTPCTRDTOF )); then CAN_DO_CALIB_TOF_LHCPHASE=1; CAN_DO_CALIB_TOF_CHANNELOFFSETS=1; else CAN_DO_CALIB_TOF_LHCPHASE=0; CAN_DO_CALIB_TOF_CHANNELOFFSETS=0; fi
17+
if has_detector_calib TOF && has_detector_reco TOF && ( ( has_detectors_reco ITS TPC && has_detector_matching ITSTPCTOF ) || ( has_detectors_reco ITS TPC TRD && has_detector_matching ITSTPCTRDTOF ) ); then CAN_DO_CALIB_TOF_LHCPHASE=1; CAN_DO_CALIB_TOF_CHANNELOFFSETS=1; else CAN_DO_CALIB_TOF_LHCPHASE=0; CAN_DO_CALIB_TOF_CHANNELOFFSETS=0; fi
1818
if has_detector_calib TPC && has_detectors ITS TPC TOF TRD && has_detector_matching ITSTPCTRDTOF; then CAN_DO_CALIB_TPC_SCDCALIB=1; else CAN_DO_CALIB_TPC_SCDCALIB=0; fi
1919
if has_detector_calib TPC && has_processing_step TPC_DEDX; then CAN_DO_CALIB_TPC_TIMEGAIN=1; CAN_DO_CALIB_TPC_RESPADGAIN=1; else CAN_DO_CALIB_TPC_TIMEGAIN=0; CAN_DO_CALIB_TPC_RESPADGAIN=0; fi
2020
if has_detector_calib TPC && has_detectors ITS TPC && has_detector_matching ITSTPC; then CAN_DO_CALIB_TPC_VDRIFTTGL=1; else CAN_DO_CALIB_TPC_VDRIFTTGL=0; fi

DATA/production/configurations/2022/LHC22f/apass1/setenv_extra.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ fi
7272
CTP_BC_SHIFT=0
7373
if [[ $ALIEN_JDL_LPMANCHORYEAR == "2022" ]]; then
7474
CTP_BC_SHIFT=-294
75+
fi
7576
if [[ $RUNNUMBER -ge 538923 ]] && [[ $RUNNUMBER -le 539700 ]]; then
7677
# 3 BC offset (future direction) in CTP data observed for LHC23zd - LHC23zs
7778
CTP_BC_SHIFT=-3

DATA/production/configurations/asyncReco/async_pass.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ else
576576
echo "nCTFsFilesInspected_step1 = $nCTFsFilesInspected_step1, nCTFsFilesInspected_step2 = $nCTFsFilesInspected_step2" > validation_error.message
577577
echo "nCTFsFilesOK_step1 = $nCTFsFilesOK_step1, nCTFsFilesOK_step2 = $nCTFsFilesOK_step2" > validation_error.message
578578
echo "nCTFsProcessed_step1 = $nCTFsProcessed_step1, nCTFsProcessed_step2 = $nCTFsProcessed_step2" > validation_error.message
579-
exit 1000
579+
exit 255
580580
fi
581581
fi
582582
fi
@@ -745,7 +745,7 @@ if [[ $ALIEN_JDL_AODOFF != 1 ]]; then
745745
CURRENT_POOL_SIZE=`jobs -r | wc -l`
746746
done < $JOB_LIST
747747
# collecting return codes of the merging processes
748-
for i in ${!arr[@]}; do
748+
for i in "${!arr[@]}"; do
749749
wait ${arr[$i]}
750750
exitcode=$?
751751
if [[ $exitcode -ne 0 ]]; then

0 commit comments

Comments
 (0)