From 3ea11129012b9ffdf5f38724e11fa9efda9362f5 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Thu, 31 May 2012 16:39:36 -0500 Subject: [PATCH] Fix multiple distro dependency bug get_packages() icorrectly handled multiple distros listed in a dependency file, such as: xyz # dist:fred,barney,wilma Change-Id: Ib1178b2aaaddafe581902b32776180bb0b41f1ae --- stack.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stack.sh b/stack.sh index 92a95674f7..23f8418062 100755 --- a/stack.sh +++ b/stack.sh @@ -632,13 +632,13 @@ function get_packages() { continue fi - if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then # We are using BASH regexp matching feature. - package=${BASH_REMATCH[1]} - distros=${BASH_REMATCH[2]} - for distro in ${distros//,/ }; do #In bash ${VAR,,} will lowecase VAR - [[ ${distro,,} == ${DISTRO,,} ]] && echo $package - done - continue + if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then + # We are using BASH regexp matching feature. + package=${BASH_REMATCH[1]} + distros=${BASH_REMATCH[2]} + # In bash ${VAR,,} will lowecase VAR + [[ ${distros,,} =~ ${DISTRO,,} ]] && echo $package + continue fi echo ${line%#*}