diff --git a/shell/apt.sh b/shell/apt.sh deleted file mode 100644 index a0f7353..0000000 --- a/shell/apt.sh +++ /dev/null @@ -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 -} diff --git a/shell/debian.sh b/shell/debian.sh index ffce0da..4ce02de 100644 --- a/shell/debian.sh +++ b/shell/debian.sh @@ -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" }