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 --- find-libdeps.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'find-libdeps.in') diff --git a/find-libdeps.in b/find-libdeps.in index efd9bf3..b7c3619 100644 --- a/find-libdeps.in +++ b/find-libdeps.in @@ -68,12 +68,12 @@ find . -type f $find_args | while read filename; do # get architecture of the file; if soarch is empty it's not an ELF binary soarch=$(LC_ALL=C readelf -h "$filename" 2>/dev/null | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p') - [ -n "$soarch" ] || continue + [[ -n $soarch ]] || continue if [[ $script_mode = "provides" ]]; then # get the string binaries link to: libfoo.so.1.2 -> libfoo.so.1 sofile=$(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p') - [ -z "$sofile" ] && sofile="${filename##*/}" + [[ -z $sofile" ]] && sofile="${filename##*/}" process_sofile elif [[ $script_mode = "deps" ]]; then # process all libraries needed by the binary -- cgit v1.2.3-24-g4f1b