-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
sonarqube
executable file
·38 lines (30 loc) · 861 Bytes
/
sonarqube
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
#
# Alias shell script for ./bin/sonarqube.
set -e
#######################################
# Prevent Sourcing
#
# Firstly, we need to ensure Localhost
# SonarQube is executed in a new shell
# process.
#######################################
if [[ ${BASH_SOURCE[0]} != "$0" ]]; then
echo >&2 "ERROR: \`Localhost SonarQube\` cannot be sourced."
exit 1
fi
#######################################
# Define Global Constant
#
# Secondly, we determine the Localhost
# SonarQube directory.
#######################################
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
readonly CURRENT_DIR
#######################################
# Run The Application
#
# Finally, we execute the Localhost
# SonarQube application.
#######################################
exec "${CURRENT_DIR}/bin/sonarqube" "$@"