summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 03:54:58 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 03:54:58 (EDT)
commit8173bcbcc3a05333979b0da0a765b4dedde7448e (patch)
tree09eda12b33c4b81b202a21f1a869cd2f47b67314 /src
parente59f223d3376b94a31131d1c5b72ea37fda47a00 (diff)
Don't let libopkbuild errors cause exit with -e
Diffstat (limited to 'src')
-rw-r--r--src/ob-checkbuilddeps.sh5
-rw-r--r--src/ob-installdocs.sh3
-rw-r--r--src/opkbuild.sh18
3 files changed, 11 insertions, 15 deletions
diff --git a/src/ob-checkbuilddeps.sh b/src/ob-checkbuilddeps.sh
index fd1f10b..c342666 100644
--- a/src/ob-checkbuilddeps.sh
+++ b/src/ob-checkbuilddeps.sh
@@ -86,8 +86,9 @@ main()
ob_parse_package_metadata -c '.opkbuild.cache' || exit 1
ob_set_package_substvars ''
- check_build_deps
- return ${?}
+ check_build_deps || return ${?}
+
+ return 0
}
main "${@}"
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index f48f97d..9516636 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -51,8 +51,7 @@ main()
ob_init_package '..' || exit 1
ob_parse_package_metadata -c '.opkbuild.cache' || exit 1
- doc_pkg="$(ob_get_doc_package)"
- if [ ${?} -ne 0 ]; then
+ if ! doc_pkg="$(ob_get_doc_package)"; then
ob_error "$(ob_get_msg 'cant_get_doc_pkg')"
fi
doc_pkg_doc_dir="$(ob_get_system_path 'package-docs' \
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 9f3de2c..50cd26e 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -158,9 +158,7 @@ get_options()
test_uid0_cmd()
{
# Verify that the UID 0 command works.
- test_uid=$("${opt_uid0_cmd}" -- id -u)
-
- if [ ${?} -ne 0 ]; then
+ if ! test_uid=$("${opt_uid0_cmd}" -- id -u); then
ob_error "$(ob_get_msg 'uid0_cmd_not_found')" "${opt_uid0_cmd}"
fi
@@ -311,15 +309,13 @@ build()
{
case "${opt_target}" in
'')
- ../build build && \
- ${opt_uid0_cmd} -- ../build install && \
- ${opt_uid0_cmd} -- '${BINDIR}/ob-installdocs' && \
- ${opt_uid0_cmd} -- '${BINDIR}/ob-gencontrol' && \
- ${opt_uid0_cmd} -- '${BINDIR}/ob-buildopk' && \
- ${opt_uid0_cmd} -- '${BINDIR}/ob-genchanges'
- if [ ${?} -ne 0 ]; then
+ ../build build &&
+ ${opt_uid0_cmd} -- ../build install &&
+ ${opt_uid0_cmd} -- '${BINDIR}/ob-installdocs' &&
+ ${opt_uid0_cmd} -- '${BINDIR}/ob-gencontrol' &&
+ ${opt_uid0_cmd} -- '${BINDIR}/ob-buildopk' &&
+ ${opt_uid0_cmd} -- '${BINDIR}/ob-genchanges' ||
exit 1
- fi
;;
'install'|'install-'*)
if ! ${opt_uid0_cmd} -- ../build "${opt_target}"; then