aboutsummaryrefslogtreecommitdiffstats
path: root/start.sh
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-04-03 11:05:37 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-04-07 11:27:33 +0200
commit3dbfee3fe1e9d2d5f2f25135e8633377b09dd541 (patch)
treea4878694790fcdb6129b87effbc2bef7e53a7923 /start.sh
parentaf6d4a423967e033cdf51e3762d0a4d14f659983 (diff)
downloadsonarqube-3dbfee3fe1e9d2d5f2f25135e8633377b09dd541.tar.gz
sonarqube-3dbfee3fe1e9d2d5f2f25135e8633377b09dd541.zip
fix start.sh and stop.sh on ubuntu with zsh
moved to bash instead of sh rewrite testing for existing file and directory so that hopefully it works on both Linux and MacOs
Diffstat (limited to 'start.sh')
-rwxr-xr-xstart.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/start.sh b/start.sh
index 2b4f1d3ded6..9c3a25a20cc 100755
--- a/start.sh
+++ b/start.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
OS='macosx-universal-64'
@@ -6,13 +6,15 @@ else
OS='linux-x86-64'
fi
-if ! ls sonar-application/target/sonarqube-*.zip &> /dev/null; then
+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/
-if ! ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null; then
+ls sonarqube-*/bin/$OS/sonar.sh 1> /dev/null 2>&1
+if [ "$?" != "0" ]; then
unzip sonarqube-*.zip
fi
cd sonarqube-*