summaryrefslogtreecommitdiffstats
path: root/ship/lib/punani
diff options
context:
space:
mode:
Diffstat (limited to 'ship/lib/punani')
-rw-r--r--ship/lib/punani6
1 files changed, 6 insertions, 0 deletions
diff --git a/ship/lib/punani b/ship/lib/punani
index 264d1daf..33a62444 100644
--- a/ship/lib/punani
+++ b/ship/lib/punani
@@ -6,6 +6,11 @@ punani_has() {
eval "_punani_${PACKER}_has \"\$1\""
}
+## usage: punani_owner PACKAGE
+punani_owner() {
+ eval "_punani_${PACKER}_owner \"\$1\""
+}
+
## usage: punani_install PACKAGE
punani_install() {
eval "_punani_${PACKER}_install \"\$1\""
@@ -31,6 +36,7 @@ _punani_known_packers='pacman apt-get yum brew'
_punani_pacman_install(){ pacman --noconfirm -S --needed "$@" ;}
_punani_pacman_remove(){ pacman -Rcs "$@" ;}
_punani_pacman_has(){ pacman -Q "$1" >/dev/null;}
+_punani_pacman_owner() { pacman -Qo "$1"; }
_punani_aptget_install(){ apt-get -y install "$@" ;}
_punani_aptget_remove(){ apt-get -y remove "$@" ;}
_punani_aptget_has() { dpkg -s "$1" | grep -q "Status: install";}