diff options
-rw-r--r-- | src/cpt-lib | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpt-lib b/src/cpt-lib index 12d2f2d..56f43de 100644 --- a/src/cpt-lib +++ b/src/cpt-lib @@ -393,6 +393,19 @@ sh256() { while read -r hash _; do printf '%s %s\n' "$hash" "$1"; done } +pkg_owner() { + set +f + + [ "$3" ] || set -- "$1" "$2" "$sys_db"/*/manifest + + pkg_owner=$(grep "$@") + pkg_owner=${pkg_owner%/*} + pkg_owner=${pkg_owner##*/} + + set -f -- "$pkg_owner"; unset pkg_owner + [ "$1" ] && printf '%s\n' "$1" +} + pkg_isbuilt() ( # Check if a package is built or not. read -r ver rel < "$(pkg_find "$1")/version" |