From 155aaf8e0e5db4fbf97a7428f74108e7e5c50426 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 1 Jun 2022 23:07:26 +0100 Subject: made file command work for /usr/ symlinks --- src/query.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/query.sh') diff --git a/src/query.sh b/src/query.sh index 17f0c57..5082ed2 100644 --- a/src/query.sh +++ b/src/query.sh @@ -37,8 +37,9 @@ file_info () { [ ! -f ${SYSROOT}$file ] && file=$(realpath $file) for pkg in $(installed); do for list in ${INSTALLED_DIR}/$pkg/files; do - grep -q ^${file}$ $list && - printf "${LIGHT_BLUE}%s${BLUE} belongs to ${LIGHT_BLUE}%s${RESET}\n" $file $pkg + [ -f $list ] && grep -q ${file}$ $list && { + ${QUIET} && echo $pkg || printf "${LIGHT_BLUE}%s${BLUE} belongs to ${LIGHT_BLUE}%s${RESET}\n" $file $pkg + } done done done -- cgit v1.2.1