From: Andrew Schoen Date: Tue, 27 Oct 2015 16:40:32 +0000 (-0500) Subject: check the exit status of chacractl exists X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f458c9a9a74d37a97242e46248c797f505f579dd;p=ceph-build.git check the exit status of chacractl exists Signed-off-by: Andrew Schoen --- diff --git a/ceph-build-next/build/build_deb b/ceph-build-next/build/build_deb index a3d0ba08..ff83d13e 100644 --- a/ceph-build-next/build/build_deb +++ b/ceph-build-next/build/build_deb @@ -11,11 +11,11 @@ vers=`cat ./dist/version` distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"` chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}" -binary_exists=`chacractl binary exists ${chacra_endpoint}` +chacractl binary exists ${chacra_endpoint} # if the binary already exists in chacra, do not rebuild -if [ "$binary_exists" = true ] ; then - echo "The binary at ${chacra_endpoint} already exists, Exiting..." +if [ $? -e 0 ] ; then + echo "The endpoint at ${chacra_endpoint} already exists, Exiting..." exit 0 fi diff --git a/ceph-build-next/build/build_rpm b/ceph-build-next/build/build_rpm index 2ff475ec..adf0d5a3 100644 --- a/ceph-build-next/build/build_rpm +++ b/ceph-build-next/build/build_rpm @@ -58,11 +58,11 @@ vers=`cat ./dist/version` [ "$TEST" = true ] && chacra_ref="$vers" || chacra_ref="test" chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}" -binary_exists=`chacractl binary exists ${chacra_baseurl}/${ARCH}` +chacractl binary exists ${chacra_baseurl}/${ARCH} # if the binary already exists in chacra, do not rebuild -if [ "$binary_exists" = true ] ; then - echo "The binary at ${chacra_baseurl}/${ARCH} already exists, Exiting..." +if [ $? -e 0 ] ; then + echo "The endpoint at ${chacra_baseurl}/${ARCH} already exists, Exiting..." exit 0 fi