diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-18 12:45:05 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-18 12:45:05 (EDT) |
commit | 671b05eacf570e0f27485ab992d1548c86727ca9 (patch) | |
tree | 15e4b79badcb07b033f3c94fbaac6191f3fdf844 /src | |
parent | de8ad4a80221f567866b97662d83756b406ff66f (diff) |
ob-gencontrol: Decrease indentation in loop
Diffstat (limited to 'src')
-rw-r--r-- | src/ob-gencontrol.sh | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh index d825bc8..bc373e3 100644 --- a/src/ob-gencontrol.sh +++ b/src/ob-gencontrol.sh @@ -83,32 +83,31 @@ gen_control() for name in Essential Depends Recommends Suggests Pre-Depends \ Conflicts Provides Replaces; do value="$(ob_get_binary_parameter "${binary}" "${name}")" - if [ -n "${value}" ]; then - case "${name}" in - 'Essential') - ;; - 'Depends' | 'Recommends' | \ - 'Suggests' | 'Pre-Depends') - value="$(ob_reduce_deps \ - -a "${OPK_HOST_ARCH}" \ - -p "${OPK_HOST_PLAT}" \ - "${value}")" - value="$(ob_substvars \ - "${value}")" - ;; - 'Conflicts' | 'Provides' | 'Replaces') - value="$(ob_reduce_deps \ - -a "${OPK_HOST_ARCH}" \ - -p "${OPK_HOST_PLAT}" \ - -u "${value}")" - value="$(ob_substvars \ - "${value}")" - ;; - esac - printf '%s: %s\n' "${name}" "${value}" | \ - sed 's/[, ]*$//' \ - >>"${binary}.control/control" + if [ -z "${value}" ]; then + continue fi + case "${name}" in + 'Essential') + ;; + 'Depends' | 'Recommends' | \ + 'Suggests' | 'Pre-Depends') + value="$(ob_reduce_deps \ + -a "${OPK_HOST_ARCH}" \ + -p "${OPK_HOST_PLAT}" \ + "${value}")" + value="$(ob_substvars "${value}")" + ;; + 'Conflicts' | 'Provides' | 'Replaces') + value="$(ob_reduce_deps \ + -a "${OPK_HOST_ARCH}" \ + -p "${OPK_HOST_PLAT}" \ + -u "${value}")" + value="$(ob_substvars "${value}")" + ;; + esac + printf '%s: %s\n' "${name}" "${value}" | \ + sed 's/[, ]*$//' \ + >>"${binary}.control/control" done fi |