File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ declare -A runnumHash # `rdirs` element -> run number
300300for rdir in ${rdirs[@]} ; do
301301 # get the run number, either from `rdir` basename (fast), or from `RUN::config` (slow)
302302 [[ ! -e $rdir ]] && printError " the run file/directory '$rdir ' does not exist" && continue
303- runnum=$( basename $rdir | grep -m1 -o -E " [0-9]+" || echo ' ' ) # first, try from run directory (or file) basename
303+ runnum=$( basename $rdir | grep -m1 -o -E " [0-9]+" | tail -n1 | | echo ' ' ) # first, try from run directory (or file) basename
304304 if [ -z " $runnum " ] || ${modes['swifjob']} ; then # otherwise, use RUN::config from a HIPO file (NOTE: assumes all HIPO files have the same run number)
305305 if ${modes['flatdir']} ; then
306306 $TIMELINESRC /libexec/hipo-check.sh $rdir
@@ -313,7 +313,8 @@ for rdir in ${rdirs[@]}; do
313313 runnum=$( $TIMELINESRC /libexec/run-groovy-timeline.sh $TIMELINESRC /libexec/get-run-number.groovy $firstHipo | tail -n1 | grep -m1 -o -E " [0-9]+" || echo ' ' )
314314 fi
315315 fi
316- [ -z " $runnum " -o $runnum -eq 0 ] && printError " unknown run number for '$rdir '; ignoring it!" && continue
316+ [ -z " $runnum " ] && printError " unknown run number for '$rdir '; ignoring it!" && continue
317+ [ $runnum -eq 0 ] && printError " unknown run number for '$rdir '; ignoring it!" && continue
317318 runnum=$(( 10 #$runnum ))
318319 runnumHash[$rdir ]=$runnum
319320done
You can’t perform that action at this time.
0 commit comments