diff options
author | philippe-perrin-sonarsource <philippe.perrin@sonarsource.com> | 2019-06-05 16:02:05 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-06-11 20:21:11 +0200 |
commit | 41f73e8c27d6b74cc41f087e2b60f18efd4ba675 (patch) | |
tree | a98f1a72c911c7368d0bd1e588543ecacddb8fb2 /scripts/os.sh | |
parent | 4c080d0e9ebdc3d39f9688eb3dd861ef29859d00 (diff) | |
download | sonarqube-41f73e8c27d6b74cc41f087e2b60f18efd4ba675.tar.gz sonarqube-41f73e8c27d6b74cc41f087e2b60f18efd4ba675.zip |
Add support for Windows in ./scripts/start.sh
Diffstat (limited to 'scripts/os.sh')
-rw-r--r-- | scripts/os.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/os.sh b/scripts/os.sh new file mode 100644 index 00000000000..0564e3c2adb --- /dev/null +++ b/scripts/os.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +############################### +# Helper for OS folders and scripts +############################### + +set -euo pipefail + +if [[ "${OSTYPE:-}" == "darwin"* ]]; then + OS_DIR='macosx-universal-64' + SH_FILE="sonar.sh" +elif [[ "${OSTYPE:-}" == "msys"* ]]; then + OS_DIR='windows-x86-64' + SH_FILE="StartSonar.bat" +else + OS_DIR='linux-x86-64' + SH_FILE="sonar.sh" +fi + +runSQ() { + if [[ "${OSTYPE:-}" == "msys"* ]]; then + "$1" + else + "$1" start + fi +}
\ No newline at end of file |