diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-05-15 17:46:29 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-05-15 17:46:29 (EDT) |
commit | 7f4e10ef7d07caa9fa263c0ff8ff1f8c73bb20c9 (patch) | |
tree | 4bedc36be8b12283f2aee4c85aad617ee571a592 /lib | |
parent | ee52bc612897dad0243e5a26e18fa18e97091024 (diff) |
ob_arch_is_concerned(): Check for arch:all.
tests/ob_arch_is_concerned.sh now passes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/metadata.sh | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh index ffeb9d1..86a8960 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -209,27 +209,33 @@ ob_arch_is_concerned() return 125 fi - seen_arch=1 - if [ -z "${arches}" ]; then - seen_arch=0 - fi - - for arch in ${arches}; do - not_arch="${arch#!}" - if [ "${not_arch}" != "${arch}" ]; then - if ob_match_arch "${host_arch}" "${not_arch}"; then - seen_arch=1 - break - else + if [ "x${arches}" = 'x' ]; then + return 0 + elif [ "x${host_arch}" = 'xall' ]; then + if [ "x${arches}" = 'xall' ]; then + return 0 + else + return 1 + fi + else + seen_arch=1 + for arch in ${arches}; do + not_arch="${arch#!}" + if [ "${not_arch}" != "${arch}" ]; then + if ob_match_arch "${host_arch}" "${not_arch}" + then + seen_arch=1 + break + else + seen_arch=0 + fi + elif ob_match_arch "${host_arch}" "${arch}"; then seen_arch=0 + break fi - elif ob_match_arch "${host_arch}" "${arch}"; then - seen_arch=0 - break - fi - done - - return ${seen_arch} + done + return ${seen_arch} + fi } ob_plat_is_concerned() |