From a1ae81b8656839e97a21577f5cac6cc5089e032c Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 17 Jun 2020 12:36:07 -0400 Subject: Clean up "if :; then" from commit 3bc002a3 It was an attempt to minimize the changes in that commit to keep it clear, but the resulting code now looks a bit jarring. --- (limited to 'src') diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh index be42c32..471e079 100644 --- a/src/ob-gencontrol.sh +++ b/src/ob-gencontrol.sh @@ -135,39 +135,33 @@ gen_control_bin() tr '\n' ' ') EOF - if :; then - for name in Essential Depends Recommends Suggests Pre-Depends \ - Conflicts Provides Replaces; do - value="$(ob_get_binary_parameter "${binary}" "${name}")" - 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}" \ - "${binary}")" - ;; - 'Conflicts' | 'Provides' | 'Replaces') - value="$(ob_reduce_deps \ - -a "${OPK_HOST_ARCH}" \ - -p "${OPK_HOST_PLAT}" \ - -u -- "${value}")" - value="$(ob_substvars "${value}" \ - "${binary}")" - ;; - esac - printf '%s: %s\n' "${name}" "${value}" | \ - sed 's/[, ]*$//' \ - >>"${binary}.control/control" - done - fi + for name in Essential Depends Recommends Suggests Pre-Depends \ + Conflicts Provides Replaces; do + value="$(ob_get_binary_parameter "${binary}" "${name}")" + 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}" "${binary}")" + ;; + 'Conflicts' | 'Provides' | 'Replaces') + value="$(ob_reduce_deps \ + -a "${OPK_HOST_ARCH}" \ + -p "${OPK_HOST_PLAT}" \ + -u -- "${value}")" + value="$(ob_substvars "${value}" "${binary}")" + ;; + esac + printf '%s: %s\n' "${name}" "${value}" | sed 's/[, ]*$//' \ + >>"${binary}.control/control" + done cat >>"${binary}.control/control" <<-EOF Installed-Size: $(calc_inst_size "${binary}") -- cgit v0.9.1