You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sonar-runner 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. #
  3. # Sonar Runner Startup Script for Unix
  4. #
  5. # Optional ENV vars:
  6. # SONAR_RUNNER_HOME - location of runner's installed home dir
  7. # SONAR_RUNNER_OPTS - parameters passed to the Java VM when running Sonar
  8. if [ -z "$SONAR_RUNNER_HOME" ] ; then
  9. PRG="$0"
  10. SONAR_RUNNER_HOME=`dirname "$PRG"`/..
  11. # make it fully qualified
  12. SONAR_RUNNER_HOME=`cd "$SONAR_RUNNER_HOME" && pwd`
  13. else
  14. # check that the SONAR_RUNNER_HOME has been correctly set
  15. if [ ! -e "$SONAR_RUNNER_HOME/lib/sonar-runner.jar" ] ; then
  16. echo '$SONAR_RUNNER_HOME' does not point to a valid installation directory: $SONAR_RUNNER_HOME
  17. exit 0
  18. fi
  19. fi
  20. JAVA_CMD="`which java`"
  21. JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner.jar
  22. PROJECT_HOME=`pwd`
  23. #echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME"
  24. #echo "Info: Using java at $JAVA_CMD"
  25. #echo "Info: Using classpath $JAVA_CLASSPATH"
  26. #echo "Info: Using project $PROJECT_HOME"
  27. exec "$JAVA_CMD" \
  28. $SONAR_RUNNER_OPTS \
  29. -classpath $JAVA_CLASSPATH \
  30. "-Drunner.home=${SONAR_RUNNER_HOME}" \
  31. "-Dproject.home=${PROJECT_HOME}" \
  32. org.sonar.runner.internal.Main "$@"