diff --git a/sh/debian.sh b/sh/debian.sh index b544f08..88e8b01 100644 --- a/sh/debian.sh +++ b/sh/debian.sh @@ -1,14 +1,14 @@ -SH_DEBIAN_CODENAME="$( +RWX_DEBIAN_CODENAME="$( grep "VERSION_CODENAME" "/etc/os-release" | cut --delimiter "=" --fields "2" )" -sh_apt_clean() { +rwx_apt_clean() { apt-get \ clean } -sh_apt_conf_write() { +rwx_apt_conf_write() { printf "\ Acquire::AllowInsecureRepositories False; Acquire::AllowWeakRepositories False; @@ -22,55 +22,55 @@ Dpkg::Progress True; " >"/etc/apt/apt.conf.d/apt.conf" } -sh_apt_install_backports() { - sh_apt_install_target "${SH_DEBIAN_CODENAME}-backports" "${@}" +rwx_apt_install_backports() { + rwx_apt_install_target "${RWX_DEBIAN_CODENAME}-backports" "${@}" } -sh_apt_install_release() { - sh_apt_install_target "${SH_DEBIAN_CODENAME}" "${@}" +rwx_apt_install_release() { + rwx_apt_install_target "${RWX_DEBIAN_CODENAME}" "${@}" } -sh_apt_install_target() { +rwx_apt_install_target() { local target="${1}" shift local package for package in "${@}"; do - sh_log_info - sh_log_info "${package} ← ${target}" + rwx_log "" \ + "${package} ← ${target}" apt-get \ install \ --assume-yes \ --target-release "${target}" \ "${package}" - sh_apt_clean + rwx_apt_clean done } -sh_apt_sources_write() { +rwx_apt_sources_write() { printf "%s" "\ deb https://deb.debian.org/debian \ -${SH_DEBIAN_CODENAME} main non-free-firmware contrib non-free +${RWX_DEBIAN_CODENAME} main non-free-firmware contrib non-free deb https://deb.debian.org/debian \ -${SH_DEBIAN_CODENAME}-backports main non-free-firmware contrib non-free +${RWX_DEBIAN_CODENAME}-backports main non-free-firmware contrib non-free deb https://deb.debian.org/debian \ -${SH_DEBIAN_CODENAME}-updates main non-free-firmware contrib non-free +${RWX_DEBIAN_CODENAME}-updates main non-free-firmware contrib non-free deb https://deb.debian.org/debian-security \ -${SH_DEBIAN_CODENAME}-security main non-free-firmware contrib non-free +${RWX_DEBIAN_CODENAME}-security main non-free-firmware contrib non-free " >"/etc/apt/sources.list" } -sh_apt_update() { +rwx_apt_update() { apt-get \ update } -sh_apt_upgrade() { +rwx_apt_upgrade() { apt-get \ upgrade \ --assume-yes - sh_apt_clean + rwx_apt_clean } -sh_debian_frontend_disable() { +rwx_debian_frontend_disable() { export DEBIAN_FRONTEND="noninteractive" }