blob: 9c3a25a20cc34895b695e19cf77fe572f0ef3f9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
OS='macosx-universal-64'
else
OS='linux-x86-64'
fi
ls sonar-application/target/sonarqube-*.zip 1> /dev/null 2>&1
if [ "$?" != "0" ]; then
echo 'Sources are not built'
./build.sh
fi
cd sonar-application/target/
ls sonarqube-*/bin/$OS/sonar.sh 1> /dev/null 2>&1
if [ "$?" != "0" ]; then
unzip sonarqube-*.zip
fi
cd sonarqube-*
bin/$OS/sonar.sh restart
sleep 1
tail -100f logs/sonar.log
|