summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-02 13:19:26 +0100
committerdavidovski <david@davidovski.xyz>2022-06-02 13:19:26 +0100
commit4526e5a3f28f862dec23d2932b443bc9b530f321 (patch)
treede99b420152f56c9e47128bdfdffee60f04cccaa /src
parent41001cdde15b96fb0767796e4d4643c62e085d28 (diff)
fixed issues with not finding librariesv1.5.4
Diffstat (limited to 'src')
-rw-r--r--src/query.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/query.sh b/src/query.sh
index 5082ed2..f9f2bcb 100644
--- a/src/query.sh
+++ b/src/query.sh
@@ -34,12 +34,15 @@ files () {
file_info () {
for file in $@; do
- [ ! -f ${SYSROOT}$file ] && file=$(realpath $file)
+ [ ! -f ${SYSROOT}$file ] && file=$(realpath $file 2>/dev/null)
for pkg in $(installed); do
for list in ${INSTALLED_DIR}/$pkg/files; do
- [ -f $list ] && grep -q ${file}$ $list && {
- ${QUIET} && echo $pkg || printf "${LIGHT_BLUE}%s${BLUE} belongs to ${LIGHT_BLUE}%s${RESET}\n" $file $pkg
- }
+ [ -f $list ] && {
+
+ grep -q "^/usr${file}$" $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