Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations) (download) (as text)
Wed Jun 1 15:56:13 2005 UTC (18 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 889 byte(s)
new

1 #!/bin/bash
2 # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/ldd-fix.sh,v 1.1 2005-06-01 15:56:13 niro Exp $
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 echo "Checking all files for dynamic link issues ... this may take a while ..."
13 for file in $(find $1 -type f -mount)
14 do
15 if [ -x ${file} -a ! -L ${file} ]
16 then
17 i=$(ldd ${file} | grep 'not found')
18 if [ -n "${i}" ]
19 then
20 #echo " ${file} fix me"
21 x=$(grep -irl ${file} /var/db/mage/*)
22 #echo DEBUG:$x
23 if [ -n "${x}" ]
24 then
25 for pkg in ${x}
26 do
27 k=$(basename $(dirname ${pkg}))
28 if [ -z "$(echo ${PACKAGES_TO_CHECK} | grep ${k})" ]
29 then
30 PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}"
31 fi
32 done
33 else
34 "no packages found for ${file}"
35 fi
36 fi
37 fi
38 done
39
40 #output
41 for i in ${PACKAGES_TO_CHECK}
42 do
43 echo " ${i}"
44 done
45

Properties

Name Value
svn:executable *