aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/start.sh
diff options
context:
space:
mode:
authorphilippe-perrin-sonarsource <philippe.perrin@sonarsource.com>2019-06-05 16:02:05 +0200
committerSonarTech <sonartech@sonarsource.com>2019-06-11 20:21:11 +0200
commit41f73e8c27d6b74cc41f087e2b60f18efd4ba675 (patch)
treea98f1a72c911c7368d0bd1e588543ecacddb8fb2 /scripts/start.sh
parent4c080d0e9ebdc3d39f9688eb3dd861ef29859d00 (diff)
downloadsonarqube-41f73e8c27d6b74cc41f087e2b60f18efd4ba675.tar.gz
sonarqube-41f73e8c27d6b74cc41f087e2b60f18efd4ba675.zip
Add support for Windows in ./scripts/start.sh
Diffstat (limited to 'scripts/start.sh')
-rwxr-xr-xscripts/start.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/start.sh b/scripts/start.sh
index 941b0ba1c97..1971abcaab8 100755
--- a/scripts/start.sh
+++ b/scripts/start.sh
@@ -24,6 +24,7 @@ if [ -r "$ROOT/private/scripts/editions.sh" ]; then
fi
source "$ROOT/scripts/logs.sh"
source "$ROOT/scripts/stop.sh"
+source "$ROOT/scripts/os.sh"
PATCHES=""
EDITION="$DEFAULT_EDITION"
@@ -47,12 +48,6 @@ EDITION=$(resolveAliases "$EDITION")
checkEdition "$EDITION"
checkLogArgument "$LOG"
-if [[ "${OSTYPE:-}" == "darwin"* ]]; then
- OS='macosx-universal-64'
-else
- OS='linux-x86-64'
-fi
-
OSS_ZIP="$(distributionDirOf "community")/$(baseFileNameOf "community")-*.zip"
if ! ls ${OSS_ZIP} &> /dev/null; then
echo 'Sources are not built'
@@ -64,8 +59,8 @@ stopAny
cd "$(distributionDirOf "$EDITION")"
-SH_FILE="sonarqube-*/bin/$OS/sonar.sh"
-if ! ls ${SH_FILE} &> /dev/null; then
+SH_FILE_DIR="sonarqube-*/bin/$OS_DIR/"
+if ! ls $SH_FILE_DIR &> /dev/null; then
BASE_FILE_NAME="$(baseFileNameOf "$EDITION")"
echo "Unpacking ${BASE_FILE_NAME}..."
ZIP_FILE="${BASE_FILE_NAME}-*.zip"
@@ -78,7 +73,7 @@ cd "$ROOT"
source "$ROOT"/scripts/patches_utils.sh
-SQ_EXEC="$SQ_HOME/bin/$OS/sonar.sh"
+SQ_EXEC="$SQ_HOME/bin/$OS_DIR/$SH_FILE"
# invoke patches if at least one was specified
# each patch is passed the path to the SQ instance home directory as first and only argument
@@ -86,7 +81,7 @@ if [ "$PATCHES" ]; then
call_patches "$PATCHES" "$SQ_HOME"
fi
-"$SQ_EXEC" start
+runSQ $SQ_EXEC
sleep 1
doTail "$LOG"