fix: Add package (#546)

This commit is contained in:
Kroese 2024-01-08 01:46:21 +01:00 committed by GitHub
parent 944faaa927
commit 53605bd6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,17 +130,14 @@ addPackage() {
info "Installing $desc..." info "Installing $desc..."
export DEBCONF_NOWARNINGS="yes"
export DEBIAN_FRONTEND="noninteractive"
[ -z "$COUNTRY" ] && setCountry [ -z "$COUNTRY" ] && setCountry
if [[ "${COUNTRY^^}" == "CN" ]]; then if [[ "${COUNTRY^^}" == "CN" ]]; then
sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
fi fi
apt-get -qq update DEBIAN_FRONTEND=noninteractive apt-get -qq update
apt-get -qq --no-install-recommends -y install "$pkg" > /dev/null DEBIAN_FRONTEND=noninteractive apt-get -qq --no-install-recommends -y install "$pkg" > /dev/null
return 0 return 0
} }