A missing quote in a grep command was giving out false matches.

By moving the objdump command in the same echo statement as the
filename, we ensure that every library name are displayed on a line of
their own in case they don't have a SONAME defined in their
headers. That is the case for some plugin libraries.

Signed-off-by: Eric Bélanger <[email protected]>
---
 checkpkg |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/checkpkg b/checkpkg
index f8867bd..c349795 100755
--- a/checkpkg
+++ b/checkpkg
@@ -87,9 +87,8 @@ for _pkgname in ${pkgname[@]}; do
                mkdir -p pkg
                cd pkg
                bsdtar xf ../"$pkgfile" > /dev/null
-               for i in $(diff ../filelist-$_pkgname-old ../filelist-$_pkgname 
| grep \> | grep \.so | awk '{print $2}'); do
-                       echo -n "${i}: "
-                       objdump -p $i | grep SONAME
+               for i in $(diff ../filelist-$_pkgname-old ../filelist-$_pkgname 
| grep \> | grep '\.so' | awk '{print $2}'); do
+                       echo "${i}: " "$(objdump -p $i | grep SONAME)"
                done
                cd ..
        else
-- 
1.7.5.4

Reply via email to