aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-18 18:11:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-18 18:11:31 +0200
commit629374a8950ebd575c4532685693f25c965ec8fd (patch)
tree8f2ccc52c8568ddef66cb399d25f7708f3961e1f
parent9039bdf7ffd3e08ea1c3610a999a1f8718faaa4b (diff)
Skip binary files in copyright script
-rwxr-xr-xcopyright7
1 files changed, 7 insertions, 0 deletions
diff --git a/copyright b/copyright
index b9b5aa0..7bcb308 100755
--- a/copyright
+++ b/copyright
@@ -54,6 +54,13 @@ while IFS= read -r -d '' f; do
continue
fi
+ # Exclude binary files.
+ #
+ if file -b --mime "$f" | grep -q "charset=binary"; then
+ info "skipping binary $f"
+ continue
+ fi
+
files+=("$f")
done < <(git ls-tree -r HEAD -z --name-only )