diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/metadata.sh | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh index 7a7a926..ffeb9d1 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -183,13 +183,6 @@ ob_match_plat() fi for p in ${plat_field}; do - if [ "${plat}" = 'all' ]; then - if [ "${p}" = 'all' ]; then - return 0 - else - continue - fi - fi if [ "${p}" = 'any' ]; then return 0 fi @@ -254,27 +247,33 @@ ob_plat_is_concerned() return 125 fi - seen_plat=1 - if [ -z "${plats}" ]; then - seen_plat=0 - fi - - for plat in ${plats}; do - not_plat="${plat#!}" - if [ "${not_plat}" != "${plat}" ]; then - if ob_match_plat "${host_plat}" "${not_plat}"; then - seen_plat=1 - break - else + if [ "x${plats}" = 'x' ]; then + return 0 + elif [ "x${host_plat}" = 'xall' ]; then + if [ "x${plats}" = 'xall' ]; then + return 0 + else + return 1 + fi + else + seen_plat=1 + for plat in ${plats}; do + not_plat="${plat#!}" + if [ "${not_plat}" != "${plat}" ]; then + if ob_match_plat "${host_plat}" "${not_plat}" + then + seen_plat=1 + break + else + seen_plat=0 + fi + elif ob_match_plat "${host_plat}" "${plat}"; then seen_plat=0 + break fi - elif ob_match_plat "${host_plat}" "${plat}"; then - seen_plat=0 - break - fi - done - - return ${seen_plat} + done + return ${seen_plat} + fi } ob_get_system_path() |