From 91966988f53bceb2d89c215c5b517e2830ec0b90 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 13 Mar 2019 01:20:47 -0400 Subject: ob_match_arch(): Use clearer variable names --- diff --git a/lib/metadata.sh b/lib/metadata.sh index c2aec99..2ca3eeb 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -185,26 +185,26 @@ ob_get_system_plat() ob_match_arch() { - local arch= + local match_arch= local arch_field= - local a= + local field_arch= local match_arch_rest= local field_arch_rest= local match_arch_part= local field_arch_part= if [ ${#} -eq 2 ]; then - arch="${1}" + match_arch="${1}" arch_field="${2}" else return 125 fi - for a in ${arch_field}; do + for field_arch in ${arch_field}; do # "all" == "all" - if [ "${arch}" = 'all' ]; then - if [ "${a}" = 'all' ]; then + if [ "${match_arch}" = 'all' ]; then + if [ "${field_arch}" = 'all' ]; then return 0 else continue @@ -212,13 +212,13 @@ ob_match_arch() fi # "foo-bar-baz" == "any" - if [ "${a}" = 'any' ]; then + if [ "${field_arch}" = 'any' ]; then return 0 fi # "foo-bar-baz" == "foo-any-any" - match_arch_rest="${arch}" - field_arch_rest="${a}" + match_arch_rest="${match_arch}" + field_arch_rest="${field_arch}" while [ -n "${match_arch_rest}" ] && [ -n "${field_arch_rest}" ] do IFS='-' read match_arch_part match_arch_rest <<-EOF -- cgit v0.9.1