Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1643 - (hide annotations) (download) (as text)
Fri Jan 13 18:42:36 2012 UTC (12 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 707 byte(s)
-install more scripts (pkg_all_sources, autodepend and search_soname)
1 niro 1643 #!/bin/bash
2    
3     SCANELF="scanelf -nyRB"
4     SONAME="$1"
5     BINDIR="$2"
6    
7     if [[ -z ${BINDIR} ]]
8     then
9     # use scanelf opts to scan everything in path/ldpath
10     BINDIR="-p -l"
11     fi
12    
13     build_filename_list()
14     {
15     local files
16     local i
17    
18     files="$(${SCANELF} ${BINDIR} | grep ${SONAME} | cut -d' ' -f3)"
19     FILENAME_LIST="$(for i in ${files}; do echo ${i}; done | sort -u)"
20     export FILENAME_LIST
21     }
22    
23     build_depname_list()
24     {
25     local file
26     local deps
27     local i
28    
29     for file in ${FILENAME_LIST}
30     do
31     # search exact filenames!
32     deps+=" $(magequery -e ${file})"
33     done
34     DEPNAME_LIST="$(for i in ${deps}; do echo ${i}; done | sort -u)"
35     export DEPNAME_LIST
36     }
37    
38    
39     build_filename_list
40     #echo "${FILENAME_LIST}"
41     build_depname_list
42     echo "${DEPNAME_LIST}"

Properties

Name Value
svn:executable *