Add DEBIAN_FRONTEND=noninteractive to apt

This commit is contained in:
Jordan Carlin 2024-07-22 21:35:21 -07:00
parent 23b7d2059f
commit f20edbf22e

View File

@ -47,7 +47,7 @@ fi
# Packages are grouped by which tool requires them. If multiple tools need a package, it is included in the first tool only
if [ "$FAMILY" == rhel ]; then
PACKAGE_MANAGER="dnf"
UPDATE_COMMAND="sudo dnf update -y"
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update -y"
GENERAL_PACKAGES=(which rsync git make cmake python3.12 python3-pip curl wget ftp tar pkgconf-pkg-config dialog mutt ssmtp)
GNU_PACKAGES=(autoconf automake libmpc-devel mpfr-devel gmp-devel gawk bison flex texinfo gperf libtool patchutils bc gcc gcc-c++ zlib-devel expat-devel libslirp-devel)
QEMU_PACKAGES=(glib2-devel libfdt-devel pixman-devel bzip2 ninja-build)
@ -62,8 +62,8 @@ if [ "$FAMILY" == rhel ]; then
# A newer version of gcc is required for qemu
OTHER_PACKAGES=(gcc-toolset-13)
elif [ "$FAMILY" == ubuntu ]; then
PACKAGE_MANAGER=apt-get
UPDATE_COMMAND="sudo apt-get update -y && sudo apt-get upgrade -y --with-new-pkgs"
PACKAGE_MANAGER="DEBIAN_FRONTEND=noninteractive apt-get"
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update -y && sudo $PACKAGE_MANAGER upgrade -y --with-new-pkgs"
GENERAL_PACKAGES=(rsync git make cmake python3 python3-pip python3-venv curl wget ftp tar pkg-config dialog mutt ssmtp)
GNU_PACKAGES=(autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat1-dev ninja-build libglib2.0-dev libslirp-dev)
QEMU_PACKAGES=(libfdt-dev libpixman-1-dev)
@ -120,6 +120,6 @@ else
# Update and Upgrade tools
eval "$UPDATE_COMMAND"
# Install packages listed above using appropriate package manager
sudo "$PACKAGE_MANAGER" install -y "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${SAIL_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"
sudo $PACKAGE_MANAGER install -y "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${SAIL_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"
echo -e "${SUCCESS_COLOR}Packages successfully installed.${ENDC}"
fi