Commit 9a0a613c authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

tools: Help magic_check.sh work with other awks

Like the one used by default on Debian Buster. Also, we don't want to
`set -e` by default when we use `false` on purpose...
parent 7ff12fdc
......@@ -33,7 +33,6 @@
# - 0x00112233 (most magic numbers)
# - 0x00 (where size matters)
set -e
set -u
ROOT=$(git rev-parse --show-cdup 2>/dev/null) || exit 77
......@@ -46,7 +45,7 @@ tr '[:upper:]' '[:lower:]' |
sort |
uniq -c |
sort |
awk '$1 != 1 || $2 !~ /^0x[[:xdigit:]]*$/ || length($2) !~ /^(4|10)$/' |
awk '$1 != 1 || $2 !~ /^0x[0-9a-f]*$/ || length($2) !~ /^(4|10)$/' |
while read -r COUNT MAGIC
do
if [ $COUNT -eq 1 ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment