Skip to content

Commit

Permalink
Fix UPSTREAM_CODENAME for some Debian-derived distros
Browse files Browse the repository at this point in the history
To handle custom `VERSION_CODENAME`s, it first looks for `DEBIAN_CODENAME`.
  • Loading branch information
natanjunges authored and flexiondotorg committed Sep 5, 2022
1 parent b29be77 commit f07e5fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deb-get
Original file line number Diff line number Diff line change
Expand Up @@ -2592,7 +2592,12 @@ if [ -e /etc/os-release ]; then

case "${UPSTREAM_ID}" in
ubuntu) UPSTREAM_CODENAME=$(grep UBUNTU_CODENAME /etc/os-release | cut -d'=' -f2);;
debian) UPSTREAM_CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d'=' -f2);;
debian)
UPSTREAM_CODENAME=$(grep DEBIAN_CODENAME /etc/os-release | cut -d'=' -f2)
if [ -z "${UPSTREAM_CODENAME}" ]; then
UPSTREAM_CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d'=' -f2)
fi
;;
*) UPSTREAM_CODENAME="";;
esac
else
Expand Down

0 comments on commit f07e5fc

Please # to comment.