From 29a9cf3a392bc7229a332c136b9ea7d4b70b53f2 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 13 Apr 2017 03:01:06 -0700 Subject: [PATCH] be amenable to systems without aptitude --- src/package-manager-abstractions | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/package-manager-abstractions b/src/package-manager-abstractions index 20dbc05..6936c92 100644 --- a/src/package-manager-abstractions +++ b/src/package-manager-abstractions @@ -105,7 +105,11 @@ EOF } # package info pl() { - aptitude show "$@" + if type -p aptitude &>/dev/null; then + aptitude show "$@" + else + apt-cache show "$@" + fi } pfile() { local file=$1 @@ -115,8 +119,8 @@ EOF # package name. So, commenting this, waiting to find # a config file only tracked by ucfq to see if it gives the # package name and if I can identify this kind of file. -# if [[ $file == /* ]] && ! ucfq -w $file | grep ::: &>/dev/null; then -# ucfq $file + # if [[ $file == /* ]] && ! ucfq -w $file | grep ::: &>/dev/null; then + # ucfq $file if [[ $file == */* ]]; then apt-file find -x "$file"\$ -- 2.30.2