summaryrefslogtreecommitdiff
path: root/lddd
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-28 21:20:24 -0600
committerDan McGee <dan@archlinux.org>2007-11-28 21:20:24 -0600
commitf05495dfc83739c795b5de9cf18e4cd6f29a7803 (patch)
treefc215294dc4a724d747648ceaef318f407d7c747 /lddd
parentc229a696a23bf99c4dd8c4b40d942b74c0da1672 (diff)
downloaddevtools-f05495dfc83739c795b5de9cf18e4cd6f29a7803.tar.xz
Whitespace fixes/cleanup to all of the scripts
Add the same vim modeline to all the files, as well as cleanup the newly added scripts a bit. If you look at this diff with the -w option, you'll see it really isn't all that significant. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lddd')
-rwxr-xr-xlddd42
1 files changed, 22 insertions, 20 deletions
diff --git a/lddd b/lddd
index f436921..24f6e28 100755
--- a/lddd
+++ b/lddd
@@ -1,6 +1,8 @@
#!/bin/sh
-# 2004/08/22 K. Piche Find missing library references.
-# modified by Tobias Powalowski <tpowa@archlinux.org>
+#
+# lddd - find broken library links on your machine
+#
+
ifs=$IFS
IFS=':'
@@ -11,35 +13,35 @@ TEMPDIR=$(mktemp /tmp/lddd-script.XXXX)
rm $TEMPDIR
mkdir -p $TEMPDIR
-echo " Go out drink some tea, this will take a while :) ..."
+echo " Go out and drink some tea, this will take a while :) ..."
# Check ELF binaries in the PATH and specified dir trees.
for tree in $PATH $libdirs $extras
do
- echo DIR $tree
+ echo DIR $tree
- # Get list of files in tree.
- files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! -name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name '*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' ! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' ! -name '*.cgi' ! -name '*.defs' ! -name '*.conf' ! -name '*_LOCALE' ! -name 'Compose' ! -name '*_OBJS' ! -name '*.msg' ! -name '*.mcopclass' ! -name '*.mcoptype')
- IFS=$ifs
- for i in $files
- do
- if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
- # Is an ELF binary.
- if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
- # Missing lib.
- echo "$i:" >> $TEMPDIR/raw.txt
- ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
- fi
- fi
- done
+ # Get list of files in tree.
+ files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! -name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name '*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' ! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' ! -name '*.cgi' ! -name '*.defs' ! -name '*.conf' ! -name '*_LOCALE' ! -name 'Compose' ! -name '*_OBJS' ! -name '*.msg' ! -name '*.mcopclass' ! -name '*.mcoptype')
+ IFS=$ifs
+ for i in $files
+ do
+ if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
+ # Is an ELF binary.
+ if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
+ # Missing lib.
+ echo "$i:" >> $TEMPDIR/raw.txt
+ ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
+ fi
+ fi
+ done
done
grep '^/' $TEMPDIR/raw.txt | sed -e 's/://g' >> $TEMPDIR/affected-files.txt
# invoke pacman
for i in $(cat $TEMPDIR/affected-files.txt); do
- pacman -Qo $i | awk '{print $4,$5}' >> $TEMPDIR/pacman.txt
+ pacman -Qo $i | awk '{print $4,$5}' >> $TEMPDIR/pacman.txt
done
# clean list
sort -u $TEMPDIR/pacman.txt >> $TEMPDIR/possible-rebuilds.txt
echo "Files saved to $TEMPDIR"
-exit
+# vim:ft=sh:ts=4:sw=4:et: