iankelling.org
/
git
/
distro-functions
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e63541
)
be amenable to systems without aptitude
author
Ian Kelling
<ian@iankelling.org>
Thu, 13 Apr 2017 10:01:06 +0000
(
03:01
-0700)
committer
Ian Kelling
<ian@iankelling.org>
Thu, 13 Apr 2017 10:01:06 +0000
(
03:01
-0700)
src/package-manager-abstractions
patch
|
blob
|
history
diff --git
a/src/package-manager-abstractions
b/src/package-manager-abstractions
index 20dbc054d523b8afaa9c74da76dcc57d456e4476..6936c9271e33bd4f6123bcd724ae694de5030365 100644
(file)
--- a/
src/package-manager-abstractions
+++ b/
src/package-manager-abstractions
@@
-105,7
+105,11
@@
EOF
}
# package info
pl() {
}
# package info
pl() {
- aptitude show "$@"
+ if type -p aptitude &>/dev/null; then
+ aptitude show "$@"
+ else
+ apt-cache show "$@"
+ fi
}
pfile() {
local file=$1
}
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.
# 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"\$
if [[ $file == */* ]]; then
apt-file find -x "$file"\$