Contents of /branches/mage-next/src/tools/search_soname.sh
Parent Directory | Revision Log
Revision 1953 -
(show annotations)
(download)
(as text)
Fri Oct 12 13:00:43 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/mage/usr/lib/mage/search_soname.sh
File MIME type: application/x-sh
File size: 691 byte(s)
Fri Oct 12 13:00:43 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/mage/usr/lib/mage/search_soname.sh
File MIME type: application/x-sh
File size: 691 byte(s)
-improved soname detection
1 | #!/bin/bash |
2 | |
3 | SCANELF="scanelf -yRBqN" |
4 | SONAME="$1" |
5 | BINDIR="$2" |
6 | |
7 | if [[ -z ${SONAME} ]] |
8 | then |
9 | echo "No soname given!" |
10 | exit 1 |
11 | fi |
12 | |
13 | if [[ -z ${BINDIR} ]] |
14 | then |
15 | # use scanelf opts to scan everything in path/ldpath |
16 | BINDIR="-p -l" |
17 | fi |
18 | |
19 | build_filename_list() |
20 | { |
21 | FILENAME_LIST="$(${SCANELF} ${SONAME} ${BINDIR} | cut -d' ' -f3 | sort -u)" |
22 | export FILENAME_LIST |
23 | } |
24 | |
25 | build_depname_list() |
26 | { |
27 | local file |
28 | local deps |
29 | local i |
30 | |
31 | for file in ${FILENAME_LIST} |
32 | do |
33 | # search exact filenames! |
34 | deps+=" $(magequery -e ${file})" |
35 | done |
36 | DEPNAME_LIST="$(for i in ${deps}; do echo ${i}; done | sort -u)" |
37 | export DEPNAME_LIST |
38 | } |
39 | |
40 | build_filename_list |
41 | #echo "${FILENAME_LIST}" |
42 | build_depname_list |
43 | echo "${DEPNAME_LIST}" |
Properties
Name | Value |
---|---|
svn:executable | * |