scripts: Install deps without confirmation

This makes `dep.sh` usable from CI. Also update the package lists before
installing on debian/ubuntu.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2022-08-29 12:55:07 -06:00
parent 7160b01929
commit 161895da77
2 changed files with 7 additions and 1 deletions

View File

@@ -13,7 +13,10 @@ source /etc/os-release
msg "Installing system build dependencies"
if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then
sudo apt-get install \
sudo apt-get --quiet update
sudo apt-get --quiet install \
--no-install-recommends \
--assume-yes \
bison \
build-essential \
ccache \
@@ -37,6 +40,7 @@ if [[ "${ID}" =~ "debian" ]] || [[ "${ID_LIKE}" =~ "debian" ]]; then
elif [[ "${ID}" =~ "fedora" ]] || [[ "${ID_LIKE}" =~ "fedora" ]]; then
sudo dnf group install c-development
sudo dnf install \
--assumeyes \
ccache \
cmake \
curl \
@@ -56,6 +60,7 @@ elif [[ "${ID}" =~ "fedora" ]] || [[ "${ID_LIKE}" =~ "fedora" ]]; then
zlib-devel
elif [[ "${ID}" =~ "arch" ]] || [[ "${ID_LIKE}" =~ "arch" ]]; then
sudo pacman -S \
--no-confirm \
bison \
ccache \
cmake \