Commit Graph

11 Commits

Author SHA1 Message Date
Sébastien Lesaint 7e59b1e27f [scripts] declare bash function in portable fashion 2018-06-12 20:21:01 +02:00
Sébastien Lesaint 41df354386 [scripts] use a more portable bash shebang 2018-06-12 20:21:01 +02:00
Janos Gyerik 8149055e1f
Fix quoting issues causing a failure in OSX, and other quality issues (#2851)
* Avoid useless cat

* Properly quote command line arguments

* Use [ \t] instead of \s for BSD sed

* Do not delete commented out property settings, by matching strictly at start of line

* Add forgotten double-quotes

* Explicitly escape \t (advice by shellcheck.net)
2018-01-12 15:52:19 +01:00
Sébastien Lesaint 93044147ce [SCRIPTS] fix argument passing in property_utils.sh 2017-09-22 09:32:25 +02:00
Sébastien Lesaint 6cee9fdcad Revert "wc accepts files as input parameter."
This reverts commit b66e224d79.

if FILE variable contains bash variables (such as $HOME) they are not resolved and script fails (because of 'set -euo pipefail')
2016-08-22 11:48:39 +02:00
Patrice Clement b66e224d79 wc accepts files as input parameter.
Signed-off-by: Sébastien Lesaint <sebastien.lesaint@sonarsource.com>
2016-08-18 10:01:25 +02:00
Patrice Clement 81c8363c09 Variables should be local to each function to avoid clashing in the global namespace.
Signed-off-by: Sébastien Lesaint <sebastien.lesaint@sonarsource.com>
2016-08-18 10:01:25 +02:00
Sébastien Lesaint 33e4a00751 [script] use local variable rather than function arguments 2016-05-23 16:56:27 +02:00
Priit Liivak 047e954bd5 [script] make property_utils.sh run on OSX + improve "if grep"
Now works on OSX: inline is required since in OSX providing '' as variable does not work.
More reliable OS independent version of this script.
Fixed incorrect backslash count in REGEX variable
Applied recommendations for "if grep" http://mywiki.wooledge.org/BashPitfalls#if_.5Bgrep_foo_myfile.5D
2016-05-23 16:43:34 +02:00
Sébastien Lesaint 9b6151d128 [SCRIPTS] add support to set non existing property in property_utils 2015-08-06 14:18:35 +02:00
Sébastien Lesaint c31e066717 [SCRIPTS] add support for patches to start.sh
use seperate start and stop to avoid unpredictable errors when applying patches on a live SQ instance
2015-08-06 14:18:35 +02:00