File: copyright-check

package info (click to toggle)
astroidmail 0.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,104 kB
  • sloc: cpp: 21,000; ansic: 1,619; python: 93; sh: 73; makefile: 11
file content (22 lines) | stat: -rwxr-xr-x 692 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -eu

# cleanup stray hint files from a previous run
find -type f -name '*:meta' -delete

# skip non-copyright-protected Debian files
RE_debian='debian/(changelog|copyright(-check|_hints)?|source/lintian-overrides)'

# extract metadata
RE_meta='.*\.(png|xcf)'
exiftool '-textOut!' %d%f.%e:meta -short -short -recurse -ext png -ext xcf .

# check for copyright and licensing statements
licensecheck --copyright --deb-machine --recursive --lines 0 --check '.*' --ignore "^($RE_meta|$RE_debian)$" -- * > debian/copyright_hints

# tidy listing of diverted files
sed -i -e 's/:meta$//' -e 's/:skip$//' debian/copyright_hints

# cleanup hint files
find -type f -name '*:meta' -delete