From 0488212b5a38e0fb53bcc203a52f6d31af0690e9 Mon Sep 17 00:00:00 2001 From: Natan Junges Date: Thu, 25 Aug 2022 15:07:26 +0000 Subject: [PATCH] Fix UPSTREAM_CODENAME for some Debian-derived distros To handle custom `VERSION_CODENAME`s, it first looks for `DEBIAN_CODENAME`. --- deb-get | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deb-get b/deb-get index 81716641..43111fd8 100755 --- a/deb-get +++ b/deb-get @@ -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