]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
trap the output of chacra exists in a var and then check that var 162/head
authorAndrew Schoen <aschoen@redhat.com>
Tue, 27 Oct 2015 17:35:04 +0000 (12:35 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 27 Oct 2015 17:35:04 +0000 (12:35 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build-next/build/build_deb
ceph-build-next/build/build_rpm

index 172fe5c786efe9d38e45604f86b9d41bde844b54..652ff57987b6f0226fd616bb375e18f5c10ab8da 100644 (file)
@@ -11,10 +11,10 @@ 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}
+chacractl exists binaries/${chacra_endpoint}; exists=$? || true
 
 # if the binary already exists in chacra, do not rebuild
-if [ $? -e 0 ] && [ "$FORCE" = false ] ; then
+if [ $exists -e 0 ] && [ "$FORCE" = false ] ; then
     echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..."
     exit 0
 fi
index 15940fe14504b4d0f1aa2a1b417dce84f955cb0d..e6c55a681a47b3cde1bd7fcf8605c15cc37c70ea 100644 (file)
@@ -58,10 +58,10 @@ vers=`cat ./dist/version`
 [ "$TEST" = true ] && chacra_ref="$vers" || chacra_ref="test"
 chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}"
 
-chacractl exists binaries/${chacra_baseurl}/${ARCH}
+chacractl exists binaries/${chacra_baseurl}/${ARCH}; exists=$? || true
 
 # if the binary already exists in chacra, do not rebuild
-if [ $? -e 0 ] && [ "$FORCE" = false ]; then
+if [ $exists -e 0 ] && [ "$FORCE" = false ]; then
     echo "The endpoint at ${chacra_baseurl}/${ARCH} already exists and FORCE was not set, Exiting..."
     exit 0
 fi