diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-14 23:49:56 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-14 23:50:37 (EDT) |
commit | 787a355bd7eac745efbd39668bd6bd4490c25f06 (patch) | |
tree | d5d5f55becd6fe8691ac4feca35236eb64d3d678 /lib | |
parent | ee0c303615c3c4cfac4f778f6bfbb5bd2cc62859 (diff) |
_ob_match_plat(): Remove loop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/metadata.sh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh index 80ec274..e0a1c9a 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -195,18 +195,15 @@ _ob_match_arch() _ob_match_plat() { local match_plat="${1}" - local plat_field="${2}" + local field_plat="${2}" shift 2 || _ob_abort - local field_plat= - for field_plat in ${plat_field}; do - if [ x"${field_plat}" = x'any' ]; then - return 0 - fi - if [ x"${field_plat}" = x"${match_plat}" ]; then - return 0 - fi - done + if [ x"${field_plat}" = x'any' ]; then + return 0 + fi + if [ x"${field_plat}" = x"${match_plat}" ]; then + return 0 + fi return 1 } |