summaryrefslogtreecommitdiffstats
path: root/ship/lib
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-11-14 14:13:35 +0100
committertv <tv@nomic.retiolum>2013-11-14 14:13:35 +0100
commitfd3ddc6abe23f83f304c2043fe9cabe1ee8a622c (patch)
tree9c37722d024cfeae6a2789df1e30f247c98ed89b /ship/lib
parent36a7b004e2d3bbc3858a6378b3ef19ea3e15f4a1 (diff)
ship punani: add experimental owner interface
Diffstat (limited to 'ship/lib')
-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";}