From f07e5fcc55da965ee3639ca0c708a44541925531 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 ca720042..76472d40 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