forked from rui314/mold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-build-deps.sh
executable file
·38 lines (36 loc) · 1.13 KB
/
install-build-deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash -x
set -e
source /etc/os-release
# The first line for each distro installs a build dependency.
# The second line installs extra packages for `make test`.
case "$ID$VERSION_ID" in
ubuntu20.*)
apt-get install -y git cmake libssl-dev zlib1g-dev gcc g++ g++-10
apt-get install -y file bsdmainutils
;;
ubuntu22.* | debian11)
apt-get install -y git cmake libssl-dev zlib1g-dev gcc g++
apt-get install -y file bsdmainutils
;;
fedora*)
dnf install -y git gcc-g++ cmake openssl-devel zlib-devel
dnf install -y glibc-static file libstdc++-static diffutils
;;
opensuse-leap*)
zypper install -y git make cmake zlib-devel libopenssl-devel gcc-c++ gcc11-c++
zypper install -y glibc-devel-static tar diffutils util-linux
;;
opensuse-tumbleweed*)
zypper install -y git make cmake zlib-devel libopenssl-devel gcc-c++
zypper install -y glibc-devel-static tar diffutils util-linux
;;
gentoo*)
emerge dev-vcs/git dev-util/cmake sys-libs/zlib
;;
arch*)
pacman -S --needed --noconfirm base-devel zlib openssl cmake util-linux git
;;
*)
echo "Error: don't know anything about build dependencies on $ID $VERSION_ID"
exit 1
esac