k3s/vendor/github.com/coreos/flannel/header-check.sh

9 lines
290 B
Bash
Raw Normal View History

2019-01-12 04:58:27 +00:00
#!/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