]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add a protection and a warning against running with bash version < 4
authormkrzewic <mikolaj.krzewicki@cern.ch>
Fri, 30 May 2014 18:27:05 +0000 (20:27 +0200)
committermkrzewic <mikolaj.krzewicki@cern.ch>
Fri, 30 May 2014 18:27:05 +0000 (20:27 +0200)
PWGPP/QA/scripts/runQA.sh

index 47f1183700951ec6e31aff33a915cdee871d6ea3..339fba079887b4ed420568eb1aa6182d699d10d2 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/bash
+if [ ${BASH_VERSINFO} -lt 4 ]; then
+  echo "bash version >= 4 needed, you have ${BASH_VERSION}, exiting..."
+  exit 1
+fi
+
 main()
 {
   if [[ -z $1 ]]; then
@@ -10,7 +15,7 @@ main()
     echo "  ${0##*/} configFile=runQA.config inputList=file.list outputDirectory=%det"
     return 1
   fi
+
   if ! parseConfig "$@"; then
     ${0}
     return 1