diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-01-04 17:29:55 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-01-10 12:01:57 +0100 |
commit | f2fb3f2d6710906709cefb9b5ffd5880432abbea (patch) | |
tree | f6cecfa3db6c80d51443207abd8db9d6eebc8e5c /scripts/patches_utils.sh | |
parent | 84ccf70ab4a6291eb7c257cb6712dd87cae8323f (diff) | |
download | sonarqube-f2fb3f2d6710906709cefb9b5ffd5880432abbea.tar.gz sonarqube-f2fb3f2d6710906709cefb9b5ffd5880432abbea.zip |
[script] avoid side effects in call_patches function
Diffstat (limited to 'scripts/patches_utils.sh')
-rwxr-xr-x | scripts/patches_utils.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/patches_utils.sh b/scripts/patches_utils.sh index 2b79cd18406..1792a4ce5a6 100755 --- a/scripts/patches_utils.sh +++ b/scripts/patches_utils.sh @@ -10,9 +10,10 @@ PATCHES_HOME=scripts/patches # $1: name(s) of patches to call, separated by a colon # all other arguments are passed as is to the patches function call_patches() { - PATCHES=$1 - ARGS=${@:2} - + local PATCHES=$1 + local ARGS=${@:2} + local savedIFS=$IFS + IFS=',' for PATCH in $PATCHES; do #echo "calling $PATCHES_HOME/$PATCH.sh $ARGS" @@ -20,6 +21,7 @@ function call_patches() { echo "******** $PATCH *******" $PATCHES_HOME/$PATCH.sh $ARGS done + IFS=$savedIFS echo "" } |