fix(bash): Handle different Debian versions (#4607)

Co-authored-by: locus313 <locus313@users.noreply.github.com>
This commit is contained in:
Peter
2021-03-07 20:43:22 +01:00
committed by GitHub
parent 6a7155eb7e
commit 78912075a6
2 changed files with 20 additions and 8 deletions
+16 -4
View File
@@ -1,5 +1,17 @@
sudo apt-get update
if ! command -v lsb_release &>/dev/null ; then
sudo apt-get install -y lsb-release
fi
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
libssl1.0-dev libbz2-dev libreadline-dev libncurses-dev \
mysql-server libace-6.* libace-dev curl unzip
DEBIAN_VERSION=$(lsb_release -sr)
sudo apt-get update -y
if [[ $DEBIAN_VERSION -eq "10" ]]; then
sudo apt-get install -y git cmake make gcc g++ clang default-libmysqlclient-dev \
libssl-dev libbz2-dev libreadline-dev libncurses-dev mariadb-server \
libace-6.* libace-dev
else # Debian 8 and 9 should work using this
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
libssl1.0-dev libbz2-dev libreadline-dev libncurses-dev \
mysql-server libace-6.* libace-dev curl unzip
fi