aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2018-05-30 16:06:56 +0200
committerSonarTech <sonartech@sonarsource.com>2018-06-12 20:21:01 +0200
commit77f771b0411d1d5bc92b757bad1bcbc18921e6b4 (patch)
tree9d529803573822ed77700553bfc05a4fe499e352 /scripts
parent41df35438631f365e434ca918b210733dcc78297 (diff)
downloadsonarqube-77f771b0411d1d5bc92b757bad1bcbc18921e6b4.tar.gz
sonarqube-77f771b0411d1d5bc92b757bad1bcbc18921e6b4.zip
[scripts] don't use pattern matching operator unless needed
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/editions.sh4
-rwxr-xr-xscripts/logs.sh8
-rwxr-xr-xscripts/stop.sh2
3 files changed, 7 insertions, 7 deletions
diff --git a/scripts/editions.sh b/scripts/editions.sh
index 238b4837e2f..fadf5cbe03a 100755
--- a/scripts/editions.sh
+++ b/scripts/editions.sh
@@ -13,12 +13,12 @@ function checkEditionArgument() {
local editionArg="$1"
local lowerEditionArg=$(toLower $editionArg)
- if [ "$lowerEditionArg" == "$DEFAULT_EDITION" ]; then
+ if [ "$lowerEditionArg" = "$DEFAULT_EDITION" ]; then
return
fi
for t in $EDITIONS; do
- if [ "$lowerEditionArg" == "$t" ]; then
+ if [ "$lowerEditionArg" = "$t" ]; then
return
fi
done
diff --git a/scripts/logs.sh b/scripts/logs.sh
index 90e64b3f175..e023847fb8b 100755
--- a/scripts/logs.sh
+++ b/scripts/logs.sh
@@ -31,12 +31,12 @@ function checkLogArgument() {
local logArg="$1"
local lowerLogArg=$(toLower $logArg)
- if [ "$lowerLogArg" == "$DEFAULT_LOG" ]; then
+ if [ "$lowerLogArg" = "$DEFAULT_LOG" ]; then
return
fi
for t in $LOGS; do
- if [ "$lowerLogArg" == "$t" ]; then
+ if [ "$lowerLogArg" = "$t" ]; then
return
fi
done
@@ -51,7 +51,7 @@ function buildTailArgs() {
local res=""
for t in $LOGS; do
- if [ "$logArg" == "$DEFAULT_LOG" ] || [ "$logArg" == "$t" ]; then
+ if [ "$logArg" = "$DEFAULT_LOG" ] || [ "$logArg" = "$t" ]; then
res="$res -Fn $logLines $SQ_HOME/logs/$t.log"
fi
done
@@ -68,7 +68,7 @@ function doTail() {
# check the script was called to avoid execute when script is only sourced
script_name=$(basename "$0")
-if [ "$script_name" == "logs.sh" ]; then
+if [ "$script_name" = "logs.sh" ]; then
LOG="$DEFAULT_LOG"
LINES="$DEFAULT_LINES"
EDITION="$DEFAULT_EDITION"
diff --git a/scripts/stop.sh b/scripts/stop.sh
index c0dd72d8dbb..8b94cd2d2a7 100755
--- a/scripts/stop.sh
+++ b/scripts/stop.sh
@@ -29,6 +29,6 @@ function stopAny() {
# check the script was called to avoid execute when script is only sourced
script_name=$(basename "$0")
-if [ "$script_name" == "stop.sh" ]; then
+if [ "$script_name" = "stop.sh" ]; then
stopAny
fi