mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-11-04 14:05:41 -07:00
kiss: Make owns work with multiple files.
This commit is contained in:
parent
69b63a1df1
commit
dc44ee51e7
@ -34,6 +34,8 @@ export KISS_PATH=/packages/core:/packages/extra:/packages/xorg:/packages/public
|
|||||||
=> depends: List package dependencies.
|
=> depends: List package dependencies.
|
||||||
=> install: Install a package (Runs build if needed).
|
=> install: Install a package (Runs build if needed).
|
||||||
=> list: List packages.
|
=> list: List packages.
|
||||||
|
=> manifest: List package files owned by package.
|
||||||
|
=> owns: Check which package owns a file.
|
||||||
=> remove: Remove a package.
|
=> remove: Remove a package.
|
||||||
=> search: Search for a package.
|
=> search: Search for a package.
|
||||||
=> update: Check for updates.
|
=> update: Check for updates.
|
||||||
|
9
kiss
9
kiss
@ -932,16 +932,19 @@ args() {
|
|||||||
o*)
|
o*)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss owns' requires an argument."
|
[ "$1" ] || die "'kiss owns' requires an argument."
|
||||||
[ -f "$KISS_ROOT/$1" ] || die "File '$1' doesn't exist."
|
|
||||||
|
for file; do
|
||||||
|
[ -f "$KISS_ROOT/$file" ] || die "File '$file' doesn't exist."
|
||||||
|
|
||||||
set +f
|
set +f
|
||||||
pkg_owns=$(grep -lFx "$1" "$KISS_ROOT/$pkg_db/"*/manifest)
|
pkg_owns=$(grep -lFx "$file" "$KISS_ROOT/$pkg_db/"*/manifest)
|
||||||
set -f
|
set -f
|
||||||
|
|
||||||
pkg_owns=${pkg_owns%/*}
|
pkg_owns=${pkg_owns%/*}
|
||||||
pkg_owns=${pkg_owns##*/}
|
pkg_owns=${pkg_owns##*/}
|
||||||
|
|
||||||
log "[$pkg_owns] owns '$1'"
|
log "[$pkg_owns] owns '$file'"
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Upgrade packages.
|
# Upgrade packages.
|
||||||
|
Loading…
Reference in New Issue
Block a user