#!/bin/bash # $Id$ if [ -z "$@" ] then echo "$(basename $0) /path/to" exit 1 fi PACKAGES_TO_CHECK="" # export the default C locale export LC_ALL=C echo "Checking all files for dynamic link issues ... this may take a while ..." for file in $(find $@ -mount -type f) do if [ -x ${file} -a ! -L ${file} ] then i=$(ldd ${file} | grep 'not found') if [ -n "${i}" ] then x=$(magequery -e ${file}) #echo DEBUG:$x if [ -n "${x}" ] then for pkg in ${x} do k="${pkg}" if [ -z "$(echo ${PACKAGES_TO_CHECK} | grep ${k})" ] then PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}" fi echo -e "\npkg: ${k}" done else "no packages found for ${file}" echo -e "\npkg: not managed" fi echo " fix me: ${file}" echo "${i}" | while read line; do echo " -> ${line}";done fi fi done # output echo -e "\n\nPlease check following packages:" for i in ${PACKAGES_TO_CHECK} do echo " ${i}" done