Skip to content

Commit

Permalink
Bookworm has separate non-free repository for firmware, enable that i…
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Apr 28, 2023
1 parent b6bfa14 commit 01a7455
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions template_debian/distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,16 @@ function updateDebianSourceList() {
mirror="$(cat "${INSTALL_DIR}/${TMPDIR}/.mirror")"
touch "${list}"

nonfree=non-free
if [ "${DIST_CODENAME}" = "bookworm" ]; then
nonfree=non-free-firmware
fi

# Add contrib and non-free component to repository
sed -i "s/${DIST_CODENAME} main$/${DEBIANVERSION} main contrib non-free/g" "${list}"
sed -i "s/${DIST_CODENAME} main$/${DEBIANVERSION} main contrib $nonfree/g" "${list}"

# Add main deb-src repository
source="#deb-src ${mirror} ${DEBIANVERSION} main contrib non-free"
source="#deb-src ${mirror} ${DEBIANVERSION} main contrib $nonfree"
if ! grep -r -q "$source" "${list}"*; then
echo -e "$source\n" >> "${list}"
fi
Expand All @@ -304,11 +309,11 @@ function updateDebianSourceList() {
else
security_suffix="-security"
fi
source="deb https://deb.debian.org/debian-security ${DEBIANVERSION}${security_suffix} main contrib non-free"
source="deb https://deb.debian.org/debian-security ${DEBIANVERSION}${security_suffix} main contrib $nonfree"
if ! grep -r -q "$source" "${list}"*; then
echo -e "$source" >> "${list}"
fi
source="#deb-src https://deb.debian.org/debian-security ${DEBIANVERSION}${security_suffix} main contrib non-free"
source="#deb-src https://deb.debian.org/debian-security ${DEBIANVERSION}${security_suffix} main contrib $nonfree"
if ! grep -r -q "$source" "${list}"*; then
echo -e "$source\n" >> "${list}"
fi
Expand Down

0 comments on commit 01a7455

Please sign in to comment.