diff options
author | Patrick 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) |
commit | 8173bcbcc3a05333979b0da0a765b4dedde7448e (patch) | |
tree | 09eda12b33c4b81b202a21f1a869cd2f47b67314 /src/opkbuild.sh | |
parent | e59f223d3376b94a31131d1c5b72ea37fda47a00 (diff) |
Don't let libopkbuild errors cause exit with -e
Diffstat (limited to 'src/opkbuild.sh')
-rw-r--r-- | src/opkbuild.sh | 18 |
1 files changed, 7 insertions, 11 deletions
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 |