diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-21 22:35:34 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-21 22:35:34 +0000 |
commit | 23c72df04dff42284afee7e7fc996f1c75e159b9 (patch) | |
tree | 6599ab46a7f44c03239f97a363de29b932837f27 /kiss | |
parent | 4a900e4556b3efd46fde8a777f8cca4f53a74068 (diff) | |
download | cpt-23c72df04dff42284afee7e7fc996f1c75e159b9.tar.gz |
kiss: Make owns work with multiple files.
FossilOrigin-Name: b525d3c344eeb1049591ee2c2bec1df7f8980e220ca0005970280c106fb6b30b
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -932,16 +932,19 @@ args() { o*) shift [ "$1" ] || die "'kiss owns' requires an argument." - [ -f "$KISS_ROOT/$1" ] || die "File '$1' doesn't exist." - set +f - pkg_owns=$(grep -lFx "$1" "$KISS_ROOT/$pkg_db/"*/manifest) - set -f + for file; do + [ -f "$KISS_ROOT/$file" ] || die "File '$file' doesn't exist." - pkg_owns=${pkg_owns%/*} - pkg_owns=${pkg_owns##*/} + set +f + pkg_owns=$(grep -lFx "$file" "$KISS_ROOT/$pkg_db/"*/manifest) + set -f - log "[$pkg_owns] owns '$1'" + pkg_owns=${pkg_owns%/*} + pkg_owns=${pkg_owns##*/} + + log "[$pkg_owns] owns '$file'" + done ;; # Upgrade packages. |