File: license-check.sh

package info (click to toggle)
flannel 0.9.1~ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,160 kB
  • sloc: ansic: 351; sh: 308; makefile: 186
file content (9 lines) | stat: -rwxr-xr-x 290 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash

licRes=$(for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
		head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo -e "  ${file}"
	done;)
if [ -n "${licRes}" ]; then
	echo -e "license header checking failed:\n${licRes}"
	exit 255
fi