aboutsummaryrefslogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 00000000000..096e1eac15c
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ OS='macosx-universal-64'
+else
+ OS='linux-x86-64'
+fi
+
+if ! ls sonar-application/target/sonarqube-*.zip &> /dev/null; then
+ echo 'Sources are not built'
+ ./build.sh
+fi
+
+cd sonar-application/target/
+if ! ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null; then
+ unzip sonarqube-*.zip
+fi
+cd sonarqube-*
+bin/$OS/sonar.sh restart
+echo "sonar.es.http.port=9200" >> conf/sonar.properties
+sleep 1
+tail -100f logs/sonar.log