aboutsummaryrefslogtreecommitdiffstats
path: root/start.sh
blob: 2b4f1d3ded6c1929cd78a6a7198e9ff46f8b3e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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
sleep 1
tail -100f logs/sonar.log