]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build: better SUSE detection 80/head
authorKen Dreyer <kdreyer@redhat.com>
Fri, 5 Jun 2015 23:31:43 +0000 (17:31 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Fri, 5 Jun 2015 23:31:43 +0000 (17:31 -0600)
As was done in 18890d5a0351ffe4fc495e0d47e3a86e0a9cb7ad for
radosgw-agent, update ceph-build's SUSE detection so we check for the
"zypper" file directly on-disk.

ceph-build/build/build_rpm

index 670bcc399e788c9cb7b8d25c259a8497b0fd9bfb..217e0358102426cd795945f0d10f21e7968e848d 100644 (file)
@@ -1,16 +1,7 @@
 #!/bin/bash
 set -ex
 
-# Run only in RPM based systems
-is_suse() {
-    if hash zypper 2>/dev/null; then
-        echo 1
-    else
-        echo 0
-    fi
-}
-
-if [[ ! -f /etc/redhat-release && is_suse -eq 0 ]] ; then
+if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
     exit 0
 fi