commit 1446566fbd8b8d784a589e24529d562fe90409ca
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Fri Sep 29 12:14:58 2017 +0200

    Bash scripts: Modified the --help argument is now parsed before --log.

diff --git a/compiler/GCC/gccsetup.sh b/compiler/GCC/gccsetup.sh
index 76bbd19..afb286f 100755
--- a/compiler/GCC/gccsetup.sh
+++ b/compiler/GCC/gccsetup.sh
@@ -633,6 +633,13 @@ function main {
   fi
   printf "\n"
 
+  # if --help or -h was specified, print the help text and exit
+  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
+    printHelp
+    printf "\n"
+    quitScript
+  fi
+
   # set log file if specified
   if [[ $@ == *"--log"* ]] || [[ $@ == *"--LOG"* ]]; then
     # get the parameter (file name)
@@ -656,17 +663,9 @@ function main {
       printf "\n"
     fi
   fi
-
   # log script name
   printLog "this is $(realpath ${BASH_SOURCE[0]})\n"
 
-  # if --help or -h was specified, print the help text and exit
-  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
-    printHelp
-    printf "\n"
-    quitScript
-  fi
-
   # detect installed versions and inform user
   local installedversions=()
   local currentversion=""
diff --git a/compiler/compilersetup.sh b/compiler/compilersetup.sh
index 1e2ecad..3f12665 100755
--- a/compiler/compilersetup.sh
+++ b/compiler/compilersetup.sh
@@ -346,6 +346,13 @@ function main {
   fi
   printf "\n"
 
+  # if --help or -h was specified, print the help text and exit
+  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
+    printHelp
+    printf "\n"
+    quitScript
+  fi
+
   # set log file if specified
   if [[ $@ == *"--log"* ]] || [[ $@ == *"--LOG"* ]]; then
     # get the parameter (file name)
@@ -369,17 +376,9 @@ function main {
       printf "\n"
     fi
   fi
-
   # log script name
   printLog "this is $(realpath ${BASH_SOURCE[0]})\n"
 
-  # if --help or -h was specified, print the help text and exit
-  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
-    printHelp
-    printf "\n"
-    quitScript
-  fi
-
   # parse arguments
   local otherargs=()
   while [ $# -gt 0 ]; do
diff --git a/ide/QtCreator/QtCreatorSetup.sh b/ide/QtCreator/QtCreatorSetup.sh
index bb145c0..fc5f542 100755
--- a/ide/QtCreator/QtCreatorSetup.sh
+++ b/ide/QtCreator/QtCreatorSetup.sh
@@ -793,6 +793,13 @@ function main {
   fi
   printf "\n"
 
+  # if --help or -h was specified, print the help text and exit
+  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
+    printHelp
+    printf "\n"
+    quitScript
+  fi
+
   # set log file if specified
   if [[ $@ == *"--log"* ]] || [[ $@ == *"--LOG"* ]]; then
     # get the parameter (file name)
@@ -816,17 +823,9 @@ function main {
       printf "\n"
     fi
   fi
-
   # log script name
   printLog "this is $(realpath ${BASH_SOURCE[0]})\n"
 
-  # if --help or -h was specified, print the help text and exit
-  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
-    printHelp
-    printf "\n"
-    quitScript
-  fi
-
   # parse arguments
   local otherargs=()
   while [ $# -gt 0 ]; do
diff --git a/ide/idesetup.sh b/ide/idesetup.sh
index f07249a..2d3aa72 100755
--- a/ide/idesetup.sh
+++ b/ide/idesetup.sh
@@ -346,6 +346,13 @@ function main {
   fi
   printf "\n"
 
+  # if --help or -h was specified, print the help text and exit
+  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
+    printHelp
+    printf "\n"
+    quitScript
+  fi
+
   # set log file if specified
   if [[ $@ == *"--log"* ]] || [[ $@ == *"--LOG"* ]]; then
     # get the parameter (file name)
@@ -369,17 +376,9 @@ function main {
       printf "\n"
     fi
   fi
-
   # log script name
   printLog "this is $(realpath ${BASH_SOURCE[0]})\n"
 
-  # if --help or -h was specified, print the help text and exit
-  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
-    printHelp
-    printf "\n"
-    quitScript
-  fi
-
   # parse arguments
   local otherargs=()
   while [ $# -gt 0 ]; do
diff --git a/setup.sh b/setup.sh
index 7c76a65..0ba652b 100755
--- a/setup.sh
+++ b/setup.sh
@@ -486,6 +486,14 @@ function main {
   fi
   printf "\n"
 
+  # if --help or -h was specified, print the help text and exit
+  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
+    printHelp
+    printf "\n"
+    cd $userdir
+    quitScript
+  fi
+
   # set log file if specified
   if [[ $@ == *"--log"* ]] || [[ $@ == *"--LOG"* ]]; then
     # get the parameter (file name)
@@ -509,18 +517,9 @@ function main {
       printf "\n"
     fi
   fi
-
   # log script name
   printLog "this is $(realpath ${BASH_SOURCE[0]})\n"
 
-  # if --help or -h was specified, print the help text and exit
-  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
-    printHelp
-    printf "\n"
-    cd $userdir
-    quitScript
-  fi
-
   # parse arguments
   local otherargs=()
   while [ $# -gt 0 ]; do
