Fixed up lddot a bit.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Sun, 2 Sep 2007 22:32:07 +0000 (22:32 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Sun, 2 Sep 2007 22:32:07 +0000 (22:32 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1102 959494ce-11ee-0310-bf91-de5d638817bd

lddot

diff --git a/lddot b/lddot
index 5c3568c..e9c5133 100755 (executable)
--- a/lddot
+++ b/lddot
@@ -5,7 +5,7 @@ while read dir; do
     if [ "${dir:0:1}" == "#" ]; then
        continue
     elif [ -d "$dir" ]; then
     if [ "${dir:0:1}" == "#" ]; then
        continue
     elif [ -d "$dir" ]; then
-       ldpath=$("${LDPATH[@]}" "$dir")
+       ldpath=("${ldpath[@]}" "$dir")
     fi
 done </etc/ld.so.conf
 ldpath=("${ldpath[@]}" /usr/lib /lib)
     fi
 done </etc/ld.so.conf
 ldpath=("${ldpath[@]}" /usr/lib /lib)
@@ -52,9 +52,9 @@ examine() {
     objdump -p "$1" | sed -n 's/^.*NEEDED \+\(lib.*\)/\1/p' >"$tfile"
     while read lib; do
        if ! lib2="$(findlib "$lib")"; then
     objdump -p "$1" | sed -n 's/^.*NEEDED \+\(lib.*\)/\1/p' >"$tfile"
     while read lib; do
        if ! lib2="$(findlib "$lib")"; then
-           echo "lddot: $lib: not found" >&2
-           rm -f "$tfile"
-           return 1
+           echo "\"$lib\" [ color=red ];"
+           echo "\"$1\" -> \"$lib\";"
+           continue
        fi
        lib="$lib2"
        unset lib2
        fi
        lib="$lib2"
        unset lib2