File: check-license

package info (click to toggle)
golang-github-opencontainers-image-spec 1.0.0~rc2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 532 kB
  • ctags: 185
  • sloc: makefile: 126
file content (13 lines) | stat: -rwxr-xr-x 279 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

ret=0

for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
	(head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)") || (echo "${file}:missing license header" && ret=1)
done

exit $ret