1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/bin/sh
- #
- # Sonar Runner Startup Script for Unix
- #
- # Optional ENV vars:
- # SONAR_RUNNER_HOME - location of runner's installed home dir
- # SONAR_RUNNER_OPTS - parameters passed to the Java VM when running Sonar
-
- if [ -z "$SONAR_RUNNER_HOME" ] ; then
- PRG="$0"
-
- SONAR_RUNNER_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- SONAR_RUNNER_HOME=`cd "$SONAR_RUNNER_HOME" && pwd`
- else
- # check that the SONAR_RUNNER_HOME has been correctly set
- if [ ! -e "$SONAR_RUNNER_HOME/lib/sonar-runner.jar" ] ; then
- echo '$SONAR_RUNNER_HOME' does not point to a valid installation directory: $SONAR_RUNNER_HOME
- exit 0
- fi
- fi
-
- JAVA_CMD="`which java`"
- JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner.jar
- PROJECT_HOME=`pwd`
-
- #echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME"
- #echo "Info: Using java at $JAVA_CMD"
- #echo "Info: Using classpath $JAVA_CLASSPATH"
- #echo "Info: Using project $PROJECT_HOME"
-
- exec "$JAVA_CMD" \
- $SONAR_RUNNER_OPTS \
- -classpath $JAVA_CLASSPATH \
- "-Drunner.home=${SONAR_RUNNER_HOME}" \
- "-Dproject.home=${PROJECT_HOME}" \
- org.sonar.runner.internal.Main "$@"
|