commit: c77e06ffac4dcc221b9cf8b6219d945ec0ae6ffa Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Oct 10 22:17:15 2015 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Oct 10 22:17:15 2015 +0000 URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=c77e06ff
find-binary-files.sh: More false positives for GNU Info files. find-binary-files.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/find-binary-files.sh b/find-binary-files.sh index ccff2d6..98346de 100755 --- a/find-binary-files.sh +++ b/find-binary-files.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2014 Gentoo Foundation +# Copyright 2014-2015 Gentoo Foundation # Distributed under the terms of the GNU GPL version 2 or later # Author: Ulrich Müller <[email protected]> @@ -21,9 +21,10 @@ find . \( -path ./distfiles -o -path ./local -o -path ./metadata \ # GNU Info files (or patches to them) can contain the following # control characters that produce false positives: # - 0x1f, followed by LF or FF - # - 0x7f (DEL), preceded by "Node:" in the same line + # - 0x7f (DEL), preceded by "Node:" or "Ref:" in the same line # Filter such characters and reiterate - line=$(sed -e 's/\x1f\f\?$//;/Node:/s/\x7f//' "${path}" | file -i -) + line=$(sed -e 's/\x1f\f\?$//;/\(Node\|Ref\):/s/\x7f//' "${path}" \ + | file -i -) type=${line##*:*( )} ;; esac
