Split off more Debian-related tasks into 'debian.sh'

This commit is contained in:
2025-12-24 16:32:44 -05:00
parent 16018759fb
commit 8305fa16cd
4 changed files with 97 additions and 88 deletions

View File

@@ -120,35 +120,7 @@ Pin: release n=${UBUNTU_VERSION_CODENAME}-backports
Pin-Priority: -1
EOF
elif [[ "${ID}" == 'debian' ]]; then
cat << EOF | tee --append /etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null
# ${VERSION_CODENAME^} Backports
Enabled: yes
Types: deb deb-src
URIs: http://deb.debian.org/debian/
Suites: ${VERSION_CODENAME}-backports
Components: main non-free-firmware contrib
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
cat << EOF | tee /etc/apt/preferences.d/backports.pref &> /dev/null
Package: *
Pin: release n=${VERSION_CODENAME}*
Pin-Priority: 990
Package: linux-*
Pin: release n=${VERSION_CODENAME}-backports
Pin-Priority: -1
EOF
if [[ "${VERSION_CODENAME}" == 'bookworm' ]]; then
cat << EOF | tee --append /etc/apt/preferences.d/backports.pref &> /dev/null
Package: /wayland/
Pin: release n=${VERSION_CODENAME}-backports
Pin-Priority: -1
EOF
fi
"${baseDir}/debian.sh" --contrib
fi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
@@ -164,15 +136,7 @@ if [[ "${ID}" == 'elementary' ]]; then
--autoremove \
elementary-desktop
elif [[ "${ID}" = 'debian' ]]; then
if [[ ! -f /usr/bin/tasksel ]]; then
apt \
install \
--yes \
tasksel
fi
tasksel \
--new-install
"${baseDir}/debian.sh" --tasksel
fi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then