[master] 9a0a613c6 tools: Help magic_check.sh work with other awks
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Sep 6 04:12:07 UTC 2021
commit 9a0a613c649f06298348ce9e77cfafd1fba648af
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Sep 6 05:59:03 2021 +0200
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...
diff --git a/tools/magic_check.sh b/tools/magic_check.sh
index b5ec57ee0..18db22c27 100755
--- a/tools/magic_check.sh
+++ b/tools/magic_check.sh
@@ -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 ]
More information about the varnish-commit
mailing list