Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ubuntu and Debian-derived OS using ID_LIKE in /etc/os-release #343

Merged
merged 2 commits into from Jul 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion deb-get
Expand Up @@ -2407,6 +2407,10 @@ esac
OS_CODENAME=$(lsb_release --codename --short)
if [ -e /etc/os-release ]; then
UPSTREAM_ID="$(grep "^ID=" /etc/os-release | cut -d'=' -f2)"
UPSTREAM_ID_LIKE="$(grep "^ID_LIKE=" /etc/os-release | cut -d'=' -f2 | sed s/\"//g | cut -d' ' -f1)"
if [ ! -z "$UPSTREAM_ID_LIKE" ]; then
UPSTREAM_ID=$UPSTREAM_ID_LIKE
fi
case "${UPSTREAM_ID}" in
debian) UPSTREAM_CODENAME=$(grep DEBIAN_CODENAME /etc/os-release | cut -d'=' -f2);;
ubuntu) UPSTREAM_CODENAME=$(grep UBUNTU_CODENAME /etc/os-release | cut -d'=' -f2);;
Expand Down Expand Up @@ -2453,7 +2457,7 @@ case "${ACTION}" in
ls -lh "${CACHE_DIR}/";;
clean)
elevate_privs
${ELEVATE} rm -v "${CACHE_DIR}"/*.deb;;
${ELEVATE} rm -v "${CACHE_DIR}"/*.deb
onepunchdan marked this conversation as resolved.
Show resolved Hide resolved
${ELEVATE} rm -v "${CACHE_DIR}"/*.json;;
show)
for APP in "${@,,}"; do
Expand Down