summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ob-gencontrol.sh49
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