From 41f73e8c27d6b74cc41f087e2b60f18efd4ba675 Mon Sep 17 00:00:00 2001 From: philippe-perrin-sonarsource <philippe.perrin@sonarsource.com> Date: Wed, 5 Jun 2019 16:02:05 +0200 Subject: Add support for Windows in ./scripts/start.sh --- scripts/stop.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'scripts/stop.sh') diff --git a/scripts/stop.sh b/scripts/stop.sh index 55f3757c30e..0cc9e61113e 100755 --- a/scripts/stop.sh +++ b/scripts/stop.sh @@ -7,24 +7,22 @@ set -euo pipefail ROOT=$(pwd) source "$ROOT/scripts/editions.sh" +source "$ROOT/scripts/os.sh" if [ -r "$ROOT/private/scripts/editions.sh" ]; then source "$ROOT/private/scripts/editions.sh" fi -if [[ "$OSTYPE" == "darwin"* ]]; then - OS='macosx-universal-64' -else - OS='linux-x86-64' -fi - stopAny() { - for edition in $EDITIONS; do - SONAR_SH="$(distributionDirOf "$edition")/sonarqube-*/bin/$OS/sonar.sh" + # Don't try to stop on windows for now + if [[ "${OSTYPE:-}" != "msys" ]]; then + for edition in $EDITIONS; do + SONAR_SH="$(distributionDirOf "$edition")/sonarqube-*/bin/$OS_DIR/sonar.sh" if ls $SONAR_SH &> /dev/null; then echo "$(baseFileNameOf "$edition") is unpacked" sh $SONAR_SH stop fi - done + done + fi } # check the script was called to avoid execute when script is only sourced -- cgit v1.2.3