2023-01-14 07:00:48 +03:00
|
|
|
#!/bin/sh
|
2024-03-02 11:42:57 +03:00
|
|
|
# This script installs binary packages needed to build mold.
|
|
|
|
# Feel free to send me a PR if your OS is not on this list.
|
|
|
|
|
2022-04-23 13:22:53 +03:00
|
|
|
set -e
|
2023-01-14 07:00:48 +03:00
|
|
|
. /etc/os-release
|
2022-04-23 13:22:53 +03:00
|
|
|
|
2022-09-27 06:53:08 +03:00
|
|
|
set -x
|
|
|
|
|
2022-08-05 09:40:06 +03:00
|
|
|
case "$ID-$VERSION_ID" in
|
2022-08-06 03:52:28 +03:00
|
|
|
ubuntu-20.* | pop-20.*)
|
2022-11-13 13:15:25 +03:00
|
|
|
apt-get update
|
2024-04-13 15:13:08 +03:00
|
|
|
apt-get install -y cmake gcc g++ g++-10
|
2022-04-23 13:22:53 +03:00
|
|
|
;;
|
2022-10-02 17:30:30 +03:00
|
|
|
ubuntu-* | pop-* | linuxmint-* | debian-* | raspbian-*)
|
2022-11-13 13:15:25 +03:00
|
|
|
apt-get update
|
2024-04-13 15:13:08 +03:00
|
|
|
apt-get install -y cmake gcc g++
|
2022-04-23 13:22:53 +03:00
|
|
|
;;
|
2024-02-20 09:11:20 +03:00
|
|
|
fedora-* | amzn-* | rhel-*)
|
2024-04-13 15:13:08 +03:00
|
|
|
dnf install -y gcc-g++ cmake glibc-static libstdc++-static diffutils util-linux
|
2022-04-23 13:22:53 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
opensuse-leap-*)
|
2024-03-02 11:42:57 +03:00
|
|
|
zypper install -y make cmake gcc-c++ gcc11-c++ glibc-devel-static tar diffutils util-linux
|
2022-05-14 08:47:10 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
opensuse-tumbleweed-*)
|
2024-03-02 11:42:57 +03:00
|
|
|
zypper install -y make cmake gcc-c++ glibc-devel-static tar diffutils util-linux
|
2022-05-14 08:47:10 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
gentoo-*)
|
2022-11-13 13:15:25 +03:00
|
|
|
emerge-webrsync
|
2024-04-23 16:14:15 +03:00
|
|
|
emerge dev-build/cmake
|
2022-05-13 05:45:08 +03:00
|
|
|
;;
|
2023-12-11 22:08:42 +03:00
|
|
|
arch-* | archarm-* | artix-* | endeavouros-*)
|
2024-03-02 11:42:57 +03:00
|
|
|
pacman -Sy --needed --noconfirm base-devel cmake util-linux
|
2022-07-14 08:02:11 +03:00
|
|
|
;;
|
2023-01-14 04:02:14 +03:00
|
|
|
void-*)
|
2024-03-02 11:42:57 +03:00
|
|
|
xbps-install -Sy xbps bash make cmake gcc tar diffutils util-linux
|
2023-01-14 04:02:14 +03:00
|
|
|
;;
|
2023-07-27 15:46:59 +03:00
|
|
|
alpine-*)
|
|
|
|
apk update
|
2023-08-19 07:45:33 +03:00
|
|
|
apk add bash make linux-headers cmake gcc g++
|
2023-07-27 15:46:59 +03:00
|
|
|
;;
|
2024-04-23 15:46:57 +03:00
|
|
|
clear-linux-*)
|
|
|
|
swupd update
|
|
|
|
swupd bundle-add c-basic diffutils
|
|
|
|
;;
|
2022-04-23 13:22:53 +03:00
|
|
|
*)
|
2022-08-05 09:47:30 +03:00
|
|
|
echo "Error: don't know anything about build dependencies on $ID-$VERSION_ID"
|
2022-04-23 13:22:53 +03:00
|
|
|
exit 1
|
|
|
|
esac
|