cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 027dd6f45c9ff80f5fc78f717eb5f18b71c29c05
parent 795c8e0f3c74dc1c2e368b61766563a2d97a6562
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Sun, 21 Jul 2019 17:46:38 +0300

kiss: Added kiss manifest and kiss owns

Diffstat:
Mkiss | 35++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/kiss b/kiss @@ -913,6 +913,37 @@ args() { pkg_list "$@" ;; + # Print package manifest. + m*) + shift + [ "$1" ] || die "'kiss manifest' requires an argument." + + for pkg; do + if pkg_list "$pkg" >/dev/null; then + log "[$pkg]: Owns the following files:" + cat "$KISS_ROOT/$pkg_db/$pkg/manifest" + else + log "[$pkg]: Not installed." + fi + done + ;; + + # Check which package owns a file. + o*) + shift + [ "$1" ] || die "'kiss owns' requires an argument." + [ -f "$1" ] || die "File '$1' doesn't exist." + + set +f + pkg_owns=$(grep -lFx "$1" "$KISS_ROOT/$pkg_db/"*/manifest) + set -f + + pkg_owns=${pkg_owns%/*} + pkg_owns=${pkg_owns##*/} + + log "[$pkg_owns] owns '$1'" + ;; + # Upgrade packages. u*) pkg_updates @@ -927,7 +958,7 @@ args() { # Print version and exit. v*) - log "kiss 0.5.3" + log "kiss 0.5.4" ;; # Catch all invalid arguments as well as @@ -939,6 +970,8 @@ args() { "depends: List package dependencies." \ "install: Install a package (Runs build if needed)." \ "list: List packages." \ + "manifest: List package files owned by package." \ + "owns: Check which package owns a file." \ "remove: Remove a package." \ "search: Search for a package." \ "update: Check for updates."