Magellan Linux

Annotation of /trunk/mage/usr/lib/mage/search_soname.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1953 - (hide annotations) (download) (as text)
Fri Oct 12 13:00:43 2012 UTC (11 years, 7 months ago) by niro
File MIME type: application/x-sh
File size: 691 byte(s)
-improved soname detection
1 niro 1643 #!/bin/bash
2    
3 niro 1953 SCANELF="scanelf -yRBqN"
4 niro 1643 SONAME="$1"
5     BINDIR="$2"
6    
7 niro 1644 if [[ -z ${SONAME} ]]
8     then
9     echo "No soname given!"
10     exit 1
11     fi
12    
13 niro 1643 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 niro 1953 FILENAME_LIST="$(${SCANELF} ${SONAME} ${BINDIR} | cut -d' ' -f3 | sort -u)"
22 niro 1643 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 *