$SUDO yum install -y redhat-lsb-core
fi
-if which apt-get > /dev/null ; then
+if type apt-get > /dev/null 2>&1 ; then
$SUDO apt-get install -y lsb-release
fi
+if type zypper > /dev/null 2>&1 ; then
+ $SUDO zypper --gpg-auto-import-keys --non-interactive install openSUSE-release lsb-release
+fi
+
case $(lsb_release -si) in
Ubuntu|Debian|Devuan)
$SUDO apt-get install -y dpkg-dev
packages=$(echo $packages) # change newlines into spaces
$SUDO bash -c "DEBIAN_FRONTEND=noninteractive apt-get install -y $packages"
;;
-CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
+CentOS|Fedora|RedHatEnterpriseServer)
case $(lsb_release -si) in
- SUSE*)
- $SUDO zypper -y yum-utils
- ;;
Fedora)
$SUDO yum install -y yum-utils
;;
sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
$SUDO yum-builddep -y $DIR/ceph.spec
;;
+*SUSE*)
+ sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
+ $SUDO zypper --non-interactive install $(rpmspec -q --buildrequires $DIR/ceph.spec)
+ ;;
*)
echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually."
;;