1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-22 23:20:06 -07:00

kiss-owns: Make output simpler.

This changes the output of the utility to the package name of the
match if one exists. The utility is now usable in scripts.
This commit is contained in:
Dylan Araps 2020-07-28 02:30:09 +03:00
parent a92cb95673
commit f59b725cdd
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

View File

@ -6,7 +6,7 @@
file=$(readlink -f "$KISS_ROOT/${1##$KISS_ROOT}")
[ -f "$file" ] || {
printf 'usage: kiss-owns [/path/to/file]\n'
printf 'usage: kiss-owns [/path/to/file]\n' >&2
exit 1
}
@ -20,4 +20,4 @@ pkg_owns=$(grep -lFx "${file##$KISS_ROOT}" \
pkg_owns=${pkg_owns%/*}
pkg_owns=${pkg_owns##*/}
printf '%s\n' "[$pkg_owns] owns '$1'"
printf '%s\n' "$pkg_owns"