From f59b725cdd0a95fa7219f05e9380363b03e3968b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 28 Jul 2020 02:30:09 +0300 Subject: [PATCH] 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. --- contrib/kiss-owns | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/kiss-owns b/contrib/kiss-owns index 38334ed..cde5550 100755 --- a/contrib/kiss-owns +++ b/contrib/kiss-owns @@ -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"