From 56d4dec19fbcec23f677114e4104bb9df902ed9f Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 2 Dec 2011 08:33:33 +0100 Subject: Use double brackets everywhere We already fixed a couple of these in previous patches - this one should replace all remaining uses of single brackets ("[") by double brackets. Also, use arithmetic evaluation instead of conditional expressions where appropriate and make use of "-z" and "-n" instead of comparing variables to empty strings. Signed-off-by: Lukas Fleischer --- lddd.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lddd.in') diff --git a/lddd.in b/lddd.in index ae6c2b5..61608a4 100644 --- a/lddd.in +++ b/lddd.in @@ -27,9 +27,9 @@ for tree in $PATH $libdirs $extras; do -name '*.mcopclass' ! -name '*.mcoptype') IFS=$ifs for i in $files; do - if [ $(file $i | grep -c 'ELF') -ne 0 ]; then + if (( $(file $i | grep -c 'ELF') != 0 )); then # Is an ELF binary. - if [ $(ldd $i 2>/dev/null | grep -c 'not found') -ne 0 ]; then + if (( $(ldd $i 2>/dev/null | grep -c 'not found') != 0 )); then # Missing lib. echo "$i:" >> $TEMPDIR/raw.txt ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt -- cgit v1.2.3-70-g09d2