This commit is contained in:
Marc Beninca 2024-11-15 19:20:55 +01:00
parent 9b5d0de840
commit 1a05b48cf5
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 41 additions and 40 deletions

View file

@ -1,40 +0,0 @@
apt_clean() {
apt-get \
clean
}
apt_install_backports() {
apt_install_target "${DEBIAN_CODENAME}-backports" "${@}"
}
apt_install_release() {
apt_install_target "${DEBIAN_CODENAME}" "${@}"
}
apt_install_target() {
local target="${1}"
shift
local package
for package in "${@}"; do
log_info
log_info "${package}${target}"
apt-get \
install \
--assume-yes \
--target-release "${target}" \
"${package}"
apt_clean
done
}
apt_update() {
apt-get \
update
}
apt_upgrade() {
apt-get \
upgrade \
--assume-yes
apt_clean
}

View file

@ -3,6 +3,47 @@ DEBIAN_CODENAME="$(
cut --delimiter "=" --fields "2"
)"
apt_clean() {
apt-get \
clean
}
apt_install_backports() {
apt_install_target "${DEBIAN_CODENAME}-backports" "${@}"
}
apt_install_release() {
apt_install_target "${DEBIAN_CODENAME}" "${@}"
}
apt_install_target() {
local target="${1}"
shift
local package
for package in "${@}"; do
log_info
log_info "${package}${target}"
apt-get \
install \
--assume-yes \
--target-release "${target}" \
"${package}"
apt_clean
done
}
apt_update() {
apt-get \
update
}
apt_upgrade() {
apt-get \
upgrade \
--assume-yes
apt_clean
}
debian_disable_frontend() {
export DEBIAN_FRONTEND="noninteractive"
}