Skip to content

Commit

Permalink
install-dep.sh: do not install multiple packages in one single line (#…
Browse files Browse the repository at this point in the history
…657)

The old code will just did nothing if fails to install the first
package.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
  • Loading branch information
lxbsz authored Jun 4, 2021
1 parent ce43174 commit 11fcb66
Showing 1 changed file with 39 additions and 11 deletions.
50 changes: 39 additions & 11 deletions extra/install_dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,24 @@ if [ y`uname`y = yLinuxy ]; then
case $ID in
fedora|rhel|centos)
# for generic
$SUDO yum install -y cmake make gcc libnl3 glib2 zlib kmod
$SUDO yum install -y libnl3-devel glib2-devel zlib-devel kmod-devel gperftools-devel
$SUDO yum install -y cmake make gcc
$SUDO yum install -y libnl3
$SUDO yum install -y libnl3-devel
$SUDO yum install -y glib2
$SUDO yum install -y glib2-devel
$SUDO yum install -y zlib
$SUDO yum install -y zlib-devel
$SUDO yum install -y kmod
$SUDO yum install -y kmod-devel
$SUDO yum install -y gperftools-devel

# for glusterfs
$SUDO yum install -y glusterfs-api glusterfs-api-devel
$SUDO yum install -y glusterfs-api
$SUDO yum install -y glusterfs-api-devel
# for ceph
$SUDO yum install -y librados2 librados2-devel librbd1
$SUDO yum install -y librados2
$SUDO yum install -y librados2-devel
$SUDO yum install -y librbd1
yum search librbd-devel | grep -q "N/S matched" && LIBRBD=librbd || LIBRBD=librbd1
$SUDO yum install -y $LIBRBD-devel
;;
Expand All @@ -28,24 +39,41 @@ if [ y`uname`y = yLinuxy ]; then
$SUDO apt update

# for generic
$SUDO apt install -y cmake make gcc zlib1g kmod
$SUDO apt install -y libnl-3-dev libnl-genl-3-dev libglib2.0-0 libkmod-dev libgoogle-perftools-dev
$SUDO apt install -y cmake make gcc
$SUDO apt install -y zlib1g kmod
$SUDO apt install -y libnl-3-dev
$SUDO apt install -y libnl-genl-3-dev
$SUDO apt install -y libglib2.0-0
$SUDO apt install -y libkmod-dev
$SUDO apt install -y libgoogle-perftools-dev

# for glusterfs
$SUDO apt install -y libglusterfs-dev

# for ceph
$SUDO apt install -y librados2 librbd-dev
$SUDO apt install -y librados2
$SUDO apt install -y librbd-dev
;;
sles|opensuse-tumbleweed)
# for generic
$SUDO zypper install -y cmake make gcc libnl3-200 glib2 zlib kmod
$SUDO zypper install -y libnl3-devel glib2-devel zlib-devel libkmod-devel gperftools-devel
$SUDO zypper install -y cmake make gcc
$SUDO zypper install -y libnl3-200
$SUDO zypper install -y glib2
$SUDO zypper install -y zlib
$SUDO zypper install -y kmod
$SUDO zypper install -y libnl3-devel
$SUDO zypper install -y glib2-devel
$SUDO zypper install -y zlib-devel
$SUDO zypper install -y libkmod-devel
$SUDO zypper install -y gperftools-devel

#for glusterfs
$SUDO zypper install -y glusterfs-devel glusterfs
$SUDO zypper install -y glusterfs
$SUDO zypper install -y glusterfs-devel
#for ceph
$SUDO zypper install -y librbd-devel librados-devel librados2
$SUDO zypper install -y librbd-devel
$SUDO zypper install -y librados-devel
$SUDO zypper install -y librados2
;;
*)
echo "TODO: distro not supported for now!"
Expand Down

0 comments on commit 11fcb66

Please sign in to comment.