]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
check the exit status of chacractl exists <binary_endpoint>
authorAndrew Schoen <aschoen@redhat.com>
Tue, 27 Oct 2015 16:40:32 +0000 (11:40 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 27 Oct 2015 16:40:32 +0000 (11:40 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build-next/build/build_deb
ceph-build-next/build/build_rpm

index a3d0ba085ad693980b157a8a76e6bb8d90d2bc4e..ff83d13e74770a6d1c0a6108b4c8795baddb2dbd 100644 (file)
@@ -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
 
index 2ff475ecf4ebe6a439fae1eed9ac038b319c7f5d..adf0d5a3d8c543061bd8208611f638bf95a1a9f5 100644 (file)
@@ -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