Magellan Linux

Annotation of /branches/mage-next/usr/lib/mage/ldd-fix.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1111 - (hide annotations) (download) (as text)
Wed Jul 14 17:37:07 2010 UTC (13 years, 10 months ago) by niro
Original Path: trunk/mage/usr/lib/mage/ldd-fix.sh
File MIME type: application/x-sh
File size: 1016 byte(s)
-be more informative
1 niro 82 #!/bin/bash
2 niro 1111 # $Id$
3 niro 82
4     if [ -z "$1" ]
5     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 87 for file in $(find $1 -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 1111 x=$(grep -irl ${file}§ /var/db/mage/*)
24 niro 82 #echo DEBUG:$x
25     if [ -n "${x}" ]
26     then
27     for pkg in ${x}
28     do
29     k=$(basename $(dirname ${pkg}))
30     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 *