diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-04-03 11:05:37 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-04-07 11:27:33 +0200 |
commit | 3dbfee3fe1e9d2d5f2f25135e8633377b09dd541 (patch) | |
tree | a4878694790fcdb6129b87effbc2bef7e53a7923 /start.sh | |
parent | af6d4a423967e033cdf51e3762d0a4d14f659983 (diff) | |
download | sonarqube-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-x | start.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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-* |