summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/query.sh5
1 files changed, 3 insertions, 2 deletions
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