From: Dr. David von Oheimb Date: Thu, 10 Oct 2024 20:13:42 +0000 (+0200) Subject: check-format-commit.sh: make awk patterns more robust for MacOS and certain flavors... X-Git-Tag: openssl-3.5.0-alpha1~965 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=380ea5974cc5fec47dd5ee6280e34a1b3d0313c5;p=thirdparty%2Fopenssl.git check-format-commit.sh: make awk patterns more robust for MacOS and certain flavors of Linux Reviewed-by: Neil Horman Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/25666) --- diff --git a/util/check-format-commit.sh b/util/check-format-commit.sh index cf958923fa0..d80fb19a040 100755 --- a/util/check-format-commit.sh +++ b/util/check-format-commit.sh @@ -72,14 +72,14 @@ fi touch $TEMPDIR/ranges.txt git diff -U0 $COMMIT_RANGE | awk ' BEGIN {myfile=""} - /+{3}/ { - gsub(/b\//,"",$2); + /^\+\+\+/ { + sub(/^b./,"",$2); myfile=$2 } - /@@/ { - gsub(/+/,"",$3); + /^@@/ { + sub(/^\+/,"",$3); printf myfile " " $3 "\n" - }' >> $TEMPDIR/ranges.txt || true + }' > $TEMPDIR/ranges.txt || true # filter in anything that matches on a filter regex for i in ${FILE_ALLOWLIST[@]}