summaryrefslogtreecommitdiff
path: root/src/query.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-12 22:58:22 +0000
committerdavidovski <david@davidovski.xyz>2022-03-12 22:58:22 +0000
commit0c0496130f64b4ebe051172af86c0c332db9d5e9 (patch)
treee407edf9f03bc820068223fb84b3b28e6f4353ce /src/query.sh
parent39e1b942910758aceb83c966ff1bba976261ba0e (diff)
made changed to make it more posix compliantv1.1.2
Diffstat (limited to 'src/query.sh')
-rw-r--r--src/query.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/query.sh b/src/query.sh
index c13cbcf..8ae9588 100644
--- a/src/query.sh
+++ b/src/query.sh
@@ -27,10 +27,11 @@ files () {
file_info () {
for file in $@; do
[ ! -f ${SYSROOT}$file ] && file=$(realpath $file)
- for list in ${INSTALLED_DIR}/*/files; do
- package=$(dirname $list | xargs basename)
- grep -q $file $list &&
- printf "${LIGHT_BLUE}%s${BLUE} belongs to ${LIGHT_BLUE}%s${RESET}\n" $file $package
+ for pkg in $(list_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
+ done
done
done
}