get_packages() icorrectly handled multiple distros listed in a dependency
file, such as:
xyz # dist:fred,barney,wilma
Change-Id: Ib1178b2aaaddafe581902b32776180bb0b41f1ae
(cherry picked from commit 3ea11129012b9ffdf5f38724e11fa9efda9362f5)
... | ... |
@@ -589,13 +589,13 @@ function get_packages() { |
589 | 589 |
continue |
590 | 590 |
fi |
591 | 591 |
|
592 |
- if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then # We are using BASH regexp matching feature. |
|
593 |
- package=${BASH_REMATCH[1]} |
|
594 |
- distros=${BASH_REMATCH[2]} |
|
595 |
- for distro in ${distros//,/ }; do #In bash ${VAR,,} will lowecase VAR |
|
596 |
- [[ ${distro,,} == ${DISTRO,,} ]] && echo $package |
|
597 |
- done |
|
598 |
- continue |
|
592 |
+ if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then |
|
593 |
+ # We are using BASH regexp matching feature. |
|
594 |
+ package=${BASH_REMATCH[1]} |
|
595 |
+ distros=${BASH_REMATCH[2]} |
|
596 |
+ # In bash ${VAR,,} will lowecase VAR |
|
597 |
+ [[ ${distros,,} =~ ${DISTRO,,} ]] && echo $package |
|
598 |
+ continue |
|
599 | 599 |
fi |
600 | 600 |
|
601 | 601 |
echo ${line%#*} |