From 62f871fb25b70860364b0023745c0f31516e69d0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 22 May 2023 16:22:29 +0200 Subject: make shellcheck happy --- bin/check-opcodes | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bin/check-opcodes') diff --git a/bin/check-opcodes b/bin/check-opcodes index 2949819..48a1d45 100755 --- a/bin/check-opcodes +++ b/bin/check-opcodes @@ -93,7 +93,6 @@ PACKAGE=$1 if test "$PACKAGE" = ""; then echo "ERROR: Filename of a package required as argument" >&2 usage - exit 1 fi OPCODE_ARGS="" @@ -111,7 +110,6 @@ case $ARCH in *) echo "ERROR: architecture must currently be one of i486, i686 and pentium3" >&2 usage - exit 1 esac debug "Unpacking $PACKAGE to $tmp_dir.." @@ -133,7 +131,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\? continue fi file $absfile > $tmp_dir/$file.file - + arch=$(grep ^architecture $tmp_dir/$file.objdump | sed 's/^architecture: //g' | cut -f 1 -d ,) case $arch in i386:x86-64) @@ -147,7 +145,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\? ;; esac debug " Objdump architecture: $arch" - + archelf=$(grep '^ \+Class' $tmp_dir/$file.elf | cut -f 2 -d : | tr -d ' ') case $archelf in ELF64) @@ -165,7 +163,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\? if test $arch != $archelf; then err "ERROR: $file ambigous architecture information (objdump: $arch, ELF: $archelf)" fi - + if test $arch = "x86_64"; then err "ERROR: $file is a 64-bit library!" continue @@ -193,7 +191,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\? verbose "OK: $relfile fullfills architecture constraint for $ARCH" fi fi - + done exit $EXIT_CODE -- cgit v1.2.3-70-g09d2