| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -eu |
| 4 |
|
| 5 |
# cleanup stray hint files from a previous run |
| 6 |
find -type f -name '*:meta' -delete |
| 7 |
|
| 8 |
# skip non-copyright-protected Debian files |
| 9 |
RE_debian='debian/(changelog|copyright(-check|_hints)?|source/lintian-overrides)' |
| 10 |
|
| 11 |
# extract metadata |
| 12 |
RE_meta='.*\.(png|xcf)' |
| 13 |
exiftool '-textOut!' %d%f.%e:meta -short -short -recurse -ext png -ext xcf . |
| 14 |
|
| 15 |
# check for copyright and licensing statements |
| 16 |
licensecheck --copyright --deb-machine --recursive --lines 0 --check '.*' --ignore "^($RE_meta|$RE_debian)$" -- * > debian/copyright_hints |
| 17 |
|
| 18 |
# tidy listing of diverted files |
| 19 |
sed -i -e 's/:meta$//' -e 's/:skip$//' debian/copyright_hints |
| 20 |
|
| 21 |
# cleanup hint files |
| 22 |
find -type f -name '*:meta' -delete |