dedupe
This commit is contained in:
parent
29330f62cb
commit
4b5fef0a8f
2 changed files with 2 additions and 76 deletions
|
@ -70,7 +70,3 @@ rwx_apt_upgrade() {
|
||||||
--assume-yes
|
--assume-yes
|
||||||
rwx_apt_clean
|
rwx_apt_clean
|
||||||
}
|
}
|
||||||
|
|
||||||
rwx_debian_frontend_disable() {
|
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
|
||||||
}
|
|
||||||
|
|
74
sh/debian.sh
74
sh/debian.sh
|
@ -1,76 +1,6 @@
|
||||||
RWX_DEBIAN_CODENAME="$(
|
# debian
|
||||||
grep "VERSION_CODENAME" "/etc/os-release" |
|
|
||||||
cut --delimiter "=" --fields "2"
|
|
||||||
)"
|
|
||||||
|
|
||||||
rwx_apt_clean() {
|
|
||||||
apt-get \
|
|
||||||
clean
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_conf_write() {
|
|
||||||
printf "\
|
|
||||||
Acquire::AllowInsecureRepositories False;
|
|
||||||
Acquire::AllowWeakRepositories False;
|
|
||||||
Acquire::AllowDowngradeToInsecureRepositories False;
|
|
||||||
Acquire::Check-Valid-Until True;
|
|
||||||
APT::Install-Recommends False;
|
|
||||||
APT::Install-Suggests False;
|
|
||||||
APT::Get::Show-Versions True;
|
|
||||||
Dir::Etc::SourceParts \"\";
|
|
||||||
Dpkg::Progress True;
|
|
||||||
" >"/etc/apt/apt.conf.d/apt.conf"
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_install_backports() {
|
|
||||||
rwx_apt_install_target "${RWX_DEBIAN_CODENAME}-backports" "${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_install_release() {
|
|
||||||
rwx_apt_install_target "${RWX_DEBIAN_CODENAME}" "${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_install_target() {
|
|
||||||
local target="${1}"
|
|
||||||
shift
|
|
||||||
local package
|
|
||||||
for package in "${@}"; do
|
|
||||||
rwx_log "" \
|
|
||||||
"${package} ← ${target}"
|
|
||||||
apt-get \
|
|
||||||
install \
|
|
||||||
--assume-yes \
|
|
||||||
--target-release "${target}" \
|
|
||||||
"${package}"
|
|
||||||
rwx_apt_clean
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_sources_write() {
|
|
||||||
printf "%s" "\
|
|
||||||
deb https://deb.debian.org/debian \
|
|
||||||
${RWX_DEBIAN_CODENAME} main non-free-firmware contrib non-free
|
|
||||||
deb https://deb.debian.org/debian \
|
|
||||||
${RWX_DEBIAN_CODENAME}-backports main non-free-firmware contrib non-free
|
|
||||||
deb https://deb.debian.org/debian \
|
|
||||||
${RWX_DEBIAN_CODENAME}-updates main non-free-firmware contrib non-free
|
|
||||||
deb https://deb.debian.org/debian-security \
|
|
||||||
${RWX_DEBIAN_CODENAME}-security main non-free-firmware contrib non-free
|
|
||||||
" >"/etc/apt/sources.list"
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_update() {
|
|
||||||
apt-get \
|
|
||||||
update
|
|
||||||
}
|
|
||||||
|
|
||||||
rwx_apt_upgrade() {
|
|
||||||
apt-get \
|
|
||||||
upgrade \
|
|
||||||
--assume-yes
|
|
||||||
rwx_apt_clean
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# disable interactive frontend for automation
|
||||||
rwx_debian_frontend_disable() {
|
rwx_debian_frontend_disable() {
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue