diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-22 09:32:25 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-22 09:32:25 +0200 |
commit | 93044147ce1178f75054ed27eb520c3ec8fb30dc (patch) | |
tree | f4b604945c69002b51867779c06f0119815e5cac | |
parent | 1f99769fe121078178af3a7a8e1e540c6797e808 (diff) | |
download | sonarqube-93044147ce1178f75054ed27eb520c3ec8fb30dc.tar.gz sonarqube-93044147ce1178f75054ed27eb520c3ec8fb30dc.zip |
[SCRIPTS] fix argument passing in property_utils.sh
-rwxr-xr-x | scripts/property_utils.sh | 10 |
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 } |