mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
linktree.sh: Add linktree.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
1f11eedb75
commit
997b022aae
1 changed files with 30 additions and 0 deletions
30
scripts/linktree.sh
Normal file
30
scripts/linktree.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ldflags="$@"
|
||||||
|
for f in $ldflags; do
|
||||||
|
echo checking $f
|
||||||
|
if [ "${f:0:2}" = -l ]; then
|
||||||
|
libs="$libs ${f:2}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo libs=$libs
|
||||||
|
path=$LD_LIBRARY_PATH
|
||||||
|
path=${path//:/ }
|
||||||
|
for l in $libs; do
|
||||||
|
lp=
|
||||||
|
for p in $path; do
|
||||||
|
lpc=$p/lib$l.so
|
||||||
|
if [ -r $lpc ]; then
|
||||||
|
lp=$lpc
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[ -n "$lp" ] || {
|
||||||
|
echo library $l not found in path, skipping
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
echo ==================================== $lp
|
||||||
|
lddtree $lp
|
||||||
|
done
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue