Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2268 - (show 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)
-fixed header
1 #!/bin/bash
2 # $Id$
3
4 SCANELF="scanelf -yRBqN"
5 SONAME="$1"
6 BINDIR="$2"
7
8 if [[ -z ${SONAME} ]]
9 then
10 echo "No soname given!"
11 exit 1
12 fi
13
14 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 FILENAME_LIST="$(${SCANELF} ${SONAME} ${BINDIR} | cut -d' ' -f3 | sort -u)"
23 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 *