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
1 changed files with 2 additions and 2 deletions

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"