Magellan Linux

Contents of /trunk/mage/usr/lib/mage/ldd-fix.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1111 - (show annotations) (download) (as text)
Wed Jul 14 17:37:07 2010 UTC (13 years, 9 months ago) by niro
File MIME type: application/x-sh
File size: 1016 byte(s)
-be more informative
1 #!/bin/bash
2 # $Id$
3
4 if [ -z "$1" ]
5 then
6 echo "$(basename $0) /path/to"
7 exit 1
8 fi
9
10 PACKAGES_TO_CHECK=""
11
12 # export the default C locale
13 export LC_ALL=C
14
15 echo "Checking all files for dynamic link issues ... this may take a while ..."
16 for file in $(find $1 -mount -type f)
17 do
18 if [ -x ${file} -a ! -L ${file} ]
19 then
20 i=$(ldd ${file} | grep 'not found')
21 if [ -n "${i}" ]
22 then
23 x=$(grep -irl ${file}§ /var/db/mage/*)
24 #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 echo -e "\npkg: ${k}"
35 done
36 else
37 "no packages found for ${file}"
38 echo -e "\npkg: not managed"
39 fi
40
41 echo " fix me: ${file}"
42 echo "${i}" | while read line; do echo " -> ${line}";done
43 fi
44 fi
45 done
46
47 # output
48 echo -e "\n\nPlease check following packages:"
49 for i in ${PACKAGES_TO_CHECK}
50 do
51 echo " ${i}"
52 done
53
54

Properties

Name Value
svn:executable *