Magellan Linux

Contents of /branches/mage-next/src/tools/search_soname.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2545 - (show annotations) (download) (as text)
Wed Jan 29 11:38:58 2014 UTC (10 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 785 byte(s)
-moved usr/lib/mage/search_soname.sh > src/tools/search_soname.sh
1 #!/bin/bash
2 # $Id$
3
4 #scanelf 0.7 has a bug, it ignores the first element in the path
5 PATH="/lala:${PATH}"
6
7 SCANELF="scanelf -yRBqN"
8 SONAME="$1"
9 BINDIR="$2"
10
11 if [[ -z ${SONAME} ]]
12 then
13 echo "No soname given!"
14 exit 1
15 fi
16
17 if [[ -z ${BINDIR} ]]
18 then
19 # use scanelf opts to scan everything in path/ldpath
20 BINDIR="-p -l"
21 fi
22
23 build_filename_list()
24 {
25 FILENAME_LIST="$(${SCANELF} ${SONAME} ${BINDIR} | cut -d' ' -f3 | sort -u)"
26 export FILENAME_LIST
27 }
28
29 build_depname_list()
30 {
31 local file
32 local deps
33 local i
34
35 for file in ${FILENAME_LIST}
36 do
37 # search exact filenames!
38 deps+=" $(magequery -e ${file})"
39 done
40 DEPNAME_LIST="$(for i in ${deps}; do echo ${i}; done | sort -u)"
41 export DEPNAME_LIST
42 }
43
44 build_filename_list
45 #echo "${FILENAME_LIST}"
46 build_depname_list
47 echo "${DEPNAME_LIST}"

Properties

Name Value
svn:executable *