diff options
-rw-r--r-- | lib/metadata.sh | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh index 687d96a..b33fd0e 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -170,25 +170,15 @@ ob_match_arch() return ${?} fi - # Compile patterns to match hyphenated architectures. - _obma_a_pat_norm="$(echo "${_obma_a}" | \ - sed 's/^any-/*-/;s/-any-/-*-/g;s/-any$/-*/g')" - _obma_a_pat_hyph="$(echo "${_obma_a}" | \ - sed 's/^any-/*-*-/;s/-any-/-*-*-/g;s/-any$/-*-*/g')" + # Generate an ERE to match hyphenated architectures. + _obma_a_ere="$(echo "${_obma_a}" | \ + sed 's/^any-/[^-]+-/;s/-any-/-[^-]+-/g;s/-any$/-[^-]+/g')" # "foo-bar-baz" == "foo-any-any" - case "${_obma_arch}" in - ${_obma_a_pat_hyph}) - continue - ;; - ${_obma_a_pat_norm}) - _ob_return 0 - return ${?} - ;; - *) - continue - ;; - esac + if echo "${_obma_arch}" | grep -R "${_obma_a_ere}"; then + _ob_return 0 + return ${?} + fi done |