From f2fb3f2d6710906709cefb9b5ffd5880432abbea Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Wed, 4 Jan 2017 17:29:55 +0100 Subject: [PATCH] [script] avoid side effects in call_patches function --- scripts/patches_utils.sh | 8 +++++--- 1 file 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 "" } -- 2.39.5