Signed-off-by: Andrew Schoen <aschoen@redhat.com>
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
[ "$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