From: Sébastien Lesaint Date: Wed, 4 Jan 2017 16:29:55 +0000 (+0100) Subject: [script] avoid side effects in call_patches function X-Git-Tag: 6.3-RC1~594 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f2fb3f2d6710906709cefb9b5ffd5880432abbea;p=sonarqube.git [script] avoid side effects in call_patches function --- 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 "" }