Contents of /branches/mage-next/src/tools/autodepend.in
Parent Directory | Revision Log
Revision 2546 -
(show annotations)
(download)
(as text)
Wed Jan 29 11:40:50 2014 UTC (10 years, 7 months ago) by niro
Original Path: branches/mage-next/src/tools/autodepend.sh
File MIME type: application/x-sh
File size: 840 byte(s)
Wed Jan 29 11:40:50 2014 UTC (10 years, 7 months ago) by niro
Original Path: branches/mage-next/src/tools/autodepend.sh
File MIME type: application/x-sh
File size: 840 byte(s)
-fixed whitespaces
1 | #!/bin/bash |
2 | # $Id$ |
3 | |
4 | SCANELF="scanelf -LnyRB" |
5 | BINDIR="$1" |
6 | |
7 | if [[ -z ${BINDIR} ]] |
8 | then |
9 | echo "No \$BINDIR given" |
10 | exit 1 |
11 | fi |
12 | |
13 | build_soname_list() |
14 | { |
15 | local sonames |
16 | local i |
17 | sonames="$(${SCANELF} ${BINDIR} | cut -d' ' -f2 | sed 's:,:\ :g')" |
18 | |
19 | # now drop all duplicates |
20 | SONAME_LIST="$(for i in ${sonames}; do echo ${i}; done | sort -u)" |
21 | export SONAME_LIST |
22 | } |
23 | |
24 | build_dep_list() |
25 | { |
26 | local soname |
27 | local deps |
28 | local i |
29 | local prefix |
30 | |
31 | # if /lib /lib64 are symlinks than add a prefix to honor usr-move |
32 | if [[ -L /lib ]] || [[ -L /lib64 ]] |
33 | then |
34 | prefix="/usr" |
35 | fi |
36 | |
37 | for soname in ${SONAME_LIST} |
38 | do |
39 | deps+=" $(magequery -e ${prefix}${soname})" |
40 | done |
41 | DEPNAME_LIST="$(for i in ${deps}; do echo ${i}; done | sort -u)" |
42 | export DEPNAME_LIST |
43 | } |
44 | |
45 | build_soname_list |
46 | build_dep_list |
47 | |
48 | #echo "${SONAME_LIST}" |
49 | echo "${DEPNAME_LIST}" | sed 's:\(.*\)-r.*:>= \1:' |
Properties
Name | Value |
---|---|
svn:executable | * |