2019-09-11 17:43:59 -06:00
|
|
|
#!/usr/bin/env bash
|
2023-08-30 10:54:12 -06:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
2019-09-11 17:43:59 -06:00
|
|
|
|
2023-10-13 21:53:41 -06:00
|
|
|
# shellcheck disable=SC1091
|
|
|
|
|
2019-09-11 17:43:59 -06:00
|
|
|
set -eE
|
|
|
|
|
2023-10-13 21:53:41 -06:00
|
|
|
. /etc/os-release
|
2021-02-22 00:17:28 -05:00
|
|
|
if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then
|
2025-02-27 10:17:19 -07:00
|
|
|
sudo apt-get --quiet update
|
|
|
|
sudo apt-get --quiet install --no-install-recommends --assume-yes \
|
|
|
|
bison \
|
|
|
|
build-essential \
|
|
|
|
bzip2 \
|
|
|
|
ca-certificates \
|
|
|
|
ccache \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
dosfstools \
|
|
|
|
flashrom \
|
|
|
|
flex \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
git-lfs \
|
|
|
|
gnat \
|
|
|
|
libncurses-dev \
|
|
|
|
libnss3-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libudev-dev \
|
|
|
|
make \
|
|
|
|
mtools \
|
|
|
|
parted \
|
|
|
|
patch \
|
|
|
|
pkgconf \
|
|
|
|
python-is-python3 \
|
|
|
|
tar \
|
|
|
|
uuid-dev \
|
|
|
|
xz-utils \
|
|
|
|
zlib1g-dev
|
2021-02-22 00:17:28 -05:00
|
|
|
elif [[ "${ID}" =~ "fedora" ]] || [[ "${ID_LIKE}" =~ "fedora" ]]; then
|
2025-02-27 10:17:19 -07:00
|
|
|
sudo dnf group install c-development
|
|
|
|
sudo dnf install --assumeyes \
|
|
|
|
bison \
|
|
|
|
bzip2 \
|
|
|
|
ca-certificates \
|
|
|
|
ccache \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
dosfstools \
|
|
|
|
flashrom \
|
|
|
|
flex \
|
|
|
|
gcc \
|
|
|
|
gcc-c++ \
|
|
|
|
gcc-gnat \
|
|
|
|
git-lfs \
|
|
|
|
libuuid-devel \
|
|
|
|
make \
|
|
|
|
mtools \
|
|
|
|
ncurses-devel \
|
|
|
|
nss-devel \
|
|
|
|
openssl-devel \
|
|
|
|
parted \
|
|
|
|
patch \
|
|
|
|
python-unversioned-command \
|
|
|
|
python3 \
|
|
|
|
rustup \
|
|
|
|
systemd-devel \
|
|
|
|
tar \
|
|
|
|
xz \
|
|
|
|
zlib-devel
|
2021-03-26 22:56:19 +01:00
|
|
|
elif [[ "${ID}" =~ "arch" ]] || [[ "${ID_LIKE}" =~ "arch" ]]; then
|
2025-02-27 10:17:19 -07:00
|
|
|
sudo pacman -S --noconfirm \
|
|
|
|
bison \
|
|
|
|
bzip2 \
|
|
|
|
ca-certificates \
|
|
|
|
ccache \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
dosfstools \
|
|
|
|
flashrom \
|
|
|
|
flex \
|
|
|
|
gcc \
|
|
|
|
gcc-ada \
|
|
|
|
git-lfs \
|
|
|
|
make \
|
|
|
|
mtools \
|
|
|
|
ncurses \
|
|
|
|
nss \
|
|
|
|
parted \
|
|
|
|
patch \
|
|
|
|
python \
|
|
|
|
rustup \
|
|
|
|
systemd-libs \
|
|
|
|
tar \
|
|
|
|
xz \
|
|
|
|
zlib
|
2019-09-11 17:43:59 -06:00
|
|
|
else
|
2025-02-27 10:17:19 -07:00
|
|
|
echo "unsupported host: ${ID}"
|
|
|
|
exit 1
|
2023-08-14 11:07:52 -06:00
|
|
|
fi
|