From fd3ddc6abe23f83f304c2043fe9cabe1ee8a622c Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 14 Nov 2013 14:13:35 +0100 Subject: ship punani: add experimental owner interface --- ship/lib/punani | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ship/lib') 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";} -- cgit v1.2.3