2024-11-11 19:37:25 +00:00
|
|
|
apt_clean() {
|
2024-11-11 19:40:56 +00:00
|
|
|
apt-get \
|
|
|
|
clean
|
|
|
|
}
|
|
|
|
|
2024-11-12 05:03:36 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2024-11-11 19:42:37 +00:00
|
|
|
apt_update() {
|
|
|
|
apt-get \
|
|
|
|
update
|
|
|
|
}
|
|
|
|
|
2024-11-11 19:40:56 +00:00
|
|
|
apt_upgrade() {
|
|
|
|
apt-get \
|
|
|
|
upgrade \
|
|
|
|
--assume-yes
|
2024-11-12 05:03:36 +00:00
|
|
|
apt_clean
|
2023-05-15 19:23:36 +00:00
|
|
|
}
|