some afterfixes
authormkrzewic <mikolaj.krzewicki@cern.ch>
Tue, 10 Jun 2014 17:34:56 +0000 (19:34 +0200)
committermkrzewic <mikolaj.krzewicki@cern.ch>
Tue, 10 Jun 2014 17:35:17 +0000 (19:35 +0200)
PWGPP/QA/scripts/runQA.sh

index 440f096..2c91d10 100755 (executable)
@@ -563,8 +563,12 @@ run2year()
   #defined in the config file
   #one line per year, format: year runMin runMax
   local run=$1
+  [[ -z ${run} ]] && return 1
+  local year=""
+  local runMin=""
+  local runMax=""
   while read year runMin runMax; do
-    [[ -z ${run} || -z ${runMin} || -z ${runMax} ]] && continue
+    [[ -z ${year} || -z ${runMin} || -z ${runMax} ]] && continue
     [[ ${run} -ge ${runMin} && ${run} -le ${runMax} ]] && echo ${year} && break
   done < <(echo "${runMap}")
   return 0