Merge "Fix multiple distro dependency bug"

This commit is contained in:
Jenkins 2012-06-13 22:03:50 +00:00 committed by Gerrit Code Review
commit 20cfd67d2b
1 changed files with 7 additions and 7 deletions

View File

@ -626,13 +626,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%#*}