Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-24 20:53:12 +0100
committerErich Eckner <git@eckner.net>2018-03-24 20:53:12 +0100
commitd60b4867f2cd03b23dfb7b76aaee4d68017ec384 (patch)
tree9c36e8050fc433db1338427b02caa408d90bcf84
parent8db7e5acbe9de5f44ed79ba4ce11947b3586338f (diff)
bin/check-opcodes: reduce "set +e ... set -e"
-rwxr-xr-xbin/check-opcodes8
1 files changed, 2 insertions, 6 deletions
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 ,)