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
diff --git a/stack.sh b/stack.sh
index 92a9567..23f8418 100755
--- a/stack.sh
+++ b/stack.sh
@@ -632,13 +632,13 @@
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%#*}