Annotation of /branches/mage-next/src/tools/ldd-fix.in
Parent Directory | Revision Log
Revision 2547 -
(hide annotations)
(download)
Wed Jan 29 11:42:08 2014 UTC (10 years, 7 months ago) by niro
File size: 982 byte(s)
Wed Jan 29 11:42:08 2014 UTC (10 years, 7 months ago) by niro
File size: 982 byte(s)
-renamed *.sh to *.in
1 | niro | 82 | #!/bin/bash |
2 | niro | 1111 | # $Id$ |
3 | niro | 82 | |
4 | niro | 1782 | if [ -z "$@" ] |
5 | niro | 82 | then |
6 | echo "$(basename $0) /path/to" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | PACKAGES_TO_CHECK="" | ||
11 | |||
12 | niro | 169 | # export the default C locale |
13 | export LC_ALL=C | ||
14 | |||
15 | niro | 82 | echo "Checking all files for dynamic link issues ... this may take a while ..." |
16 | niro | 1782 | for file in $(find $@ -mount -type f) |
17 | niro | 82 | do |
18 | if [ -x ${file} -a ! -L ${file} ] | ||
19 | then | ||
20 | i=$(ldd ${file} | grep 'not found') | ||
21 | if [ -n "${i}" ] | ||
22 | then | ||
23 | niro | 2155 | x=$(magequery -e ${file}) |
24 | niro | 82 | #echo DEBUG:$x |
25 | if [ -n "${x}" ] | ||
26 | then | ||
27 | for pkg in ${x} | ||
28 | do | ||
29 | niro | 2155 | k="${pkg}" |
30 | niro | 82 | if [ -z "$(echo ${PACKAGES_TO_CHECK} | grep ${k})" ] |
31 | then | ||
32 | PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}" | ||
33 | fi | ||
34 | niro | 1111 | echo -e "\npkg: ${k}" |
35 | niro | 82 | done |
36 | else | ||
37 | "no packages found for ${file}" | ||
38 | niro | 1111 | echo -e "\npkg: not managed" |
39 | niro | 82 | fi |
40 | niro | 1111 | |
41 | echo " fix me: ${file}" | ||
42 | echo "${i}" | while read line; do echo " -> ${line}";done | ||
43 | niro | 82 | fi |
44 | fi | ||
45 | done | ||
46 | |||
47 | niro | 1111 | # output |
48 | echo -e "\n\nPlease check following packages:" | ||
49 | niro | 82 | for i in ${PACKAGES_TO_CHECK} |
50 | do | ||
51 | echo " ${i}" | ||
52 | done | ||
53 | |||
54 | niro | 1111 |
Properties
Name | Value |
---|---|
svn:executable | * |