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