From a3a0f4688cf0be5f17ed5419794e81282a2e1b9d Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 3 Nov 2015 10:53:42 -0500 Subject: [PATCH] prevent an early exit from a non-zero exit status Signed-off-by: Alfredo Deza --- ceph-build-next/build/build_deb | 3 ++- ceph-build-next/build/build_rpm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ceph-build-next/build/build_deb b/ceph-build-next/build/build_deb index a3b538c5..295baf36 100644 --- a/ceph-build-next/build/build_deb +++ b/ceph-build-next/build/build_deb @@ -36,7 +36,8 @@ vers=`cat ./dist/version` distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"` chacra_endpoint="ceph/${chacra_ref}/${distro}/${DIST}/${ARCH}" -chacractl exists binaries/${chacra_endpoint}; exists=$? || true +# prevent early exit from a non-zero exit because we use `set -e` +! chacractl exists binaries/${chacra_endpoint}; exists=$? || true # if the binary already exists in chacra, do not rebuild if [ $exists -eq 0 ] && [ "$FORCE" = false ] ; then diff --git a/ceph-build-next/build/build_rpm b/ceph-build-next/build/build_rpm index e5384012..3b3096b3 100644 --- a/ceph-build-next/build/build_rpm +++ b/ceph-build-next/build/build_rpm @@ -62,7 +62,8 @@ vers=`cat ./dist/version` [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH" chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}" -chacractl exists binaries/${chacra_baseurl}/${ARCH}; exists=$? || true +# prevent early exit from a non-zero exit because we use `set -e` +! chacractl exists binaries/${chacra_baseurl}/${ARCH}; exists=$? || true # if the binary already exists in chacra, do not rebuild if [ $exists -eq 0 ] && [ "$FORCE" = false ]; then -- 2.39.5