aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-09-22 09:32:25 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-09-22 09:32:25 +0200
commit93044147ce1178f75054ed27eb520c3ec8fb30dc (patch)
treef4b604945c69002b51867779c06f0119815e5cac
parent1f99769fe121078178af3a7a8e1e540c6797e808 (diff)
downloadsonarqube-93044147ce1178f75054ed27eb520c3ec8fb30dc.tar.gz
sonarqube-93044147ce1178f75054ed27eb520c3ec8fb30dc.zip
[SCRIPTS] fix argument passing in property_utils.sh
-rwxr-xr-xscripts/property_utils.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/property_utils.sh b/scripts/property_utils.sh
index 8ac285af760..035ce53ba07 100755
--- a/scripts/property_utils.sh
+++ b/scripts/property_utils.sh
@@ -8,12 +8,12 @@
set -euo pipefail
-function cnt_lines() {
+function cnt_lines {
local FILE=$1
cat $FILE | wc -l
}
-function write_prop() {
+function write_prop {
local PROPERTY=$1
local VALUE=$2
local FILE=$3
@@ -25,7 +25,7 @@ function write_prop() {
echo "${PROPERTY}=${VALUE}" >> $FILE
}
-function set_property() {
+function set_property {
local PROPERTY=$1
local VALUE=$2
local FILE=$3
@@ -46,10 +46,10 @@ function set_property() {
local NEW_LINE_COUNT=$(cnt_lines $FILE)
if [[ $LINE_COUNT -gt $NEW_LINE_COUNT ]]; then
- write_prop $PROPERTY $VALUE $FILE
+ write_prop "$PROPERTY" "$VALUE" "$FILE"
fi
else
- write_prop $PROPERTY $VALUE $FILE
+ write_prop "$PROPERTY" "$VALUE" "$FILE"
fi
}