Magellan Linux

Contents of /branches/mage-next/src/tools/ldd-fix.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2544 - (show annotations) (download) (as text)
Wed Jan 29 11:38:15 2014 UTC (10 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 982 byte(s)
-moved usr/lib/mage/ldd-fix.sh > src/tools/ldd-fix.sh
1 #!/bin/bash
2 # $Id$
3
4 if [ -z "$@" ]
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 $@ -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=$(magequery -e ${file})
24 #echo DEBUG:$x
25 if [ -n "${x}" ]
26 then
27 for pkg in ${x}
28 do
29 k="${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 *