diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-21 14:46:38 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-21 14:46:38 +0000 |
commit | 45242244acd46f87cf9517ba527a529937c2cde0 (patch) | |
tree | b1a79d19059fae751c6ebb1410c992e9c5cd63c4 /kiss | |
parent | ff5c4909753d1ad5b6b5f2273b125ad0f07617fd (diff) | |
download | cpt-45242244acd46f87cf9517ba527a529937c2cde0.tar.gz |
kiss: Added kiss manifest and kiss owns
FossilOrigin-Name: b3116cba11f7f8115feb2caf3942cd76a8d27723aa13b9044a9ea83584550c7c
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -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." |