From d60b4867f2cd03b23dfb7b76aaee4d68017ec384 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 24 Mar 2018 20:53:12 +0100 Subject: bin/check-opcodes: reduce "set +e ... set -e" --- bin/check-opcodes | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/check-opcodes b/bin/check-opcodes index b8ad89c..caa7d89 100755 --- a/bin/check-opcodes +++ b/bin/check-opcodes @@ -123,18 +123,14 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\? file=$(basename $absfile) relfile=${absfile#$tmp_dir} debug "Checking file: $relfile" - set +e - readelf -a $absfile > $tmp_dir/$file.elf 2>/dev/null - if test $? != 0; then + if ! readelf -a $absfile > $tmp_dir/$file.elf 2>/dev/null; then debug "readelf failed, ignoring file" continue fi - objdump -f $absfile > $tmp_dir/$file.objdump 2>/dev/null - if test $? != 0; then + if ! objdump -f $absfile > $tmp_dir/$file.objdump 2>/dev/null; then debug "objdump failed, ignoring file" continue fi - set -e file $absfile > $tmp_dir/$file.file arch=$(grep ^architecture $tmp_dir/$file.objdump | sed 's/^architecture: //g' | cut -f 1 -d ,) -- cgit v1.2.3-70-g09d2