X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0bd8810e6ea29ab242472b9dae11c621cf50953c..f94acaa49ff3dada2083a2e9ae690b8652f16d3e:/build/check-copyright-notices diff --git a/build/check-copyright-notices b/build/check-copyright-notices index aef14fa6ad..857a9c8ebc 100755 --- a/build/check-copyright-notices +++ b/build/check-copyright-notices @@ -41,161 +41,177 @@ EOF done fixer() { - want="${want}" perl -pi~ -e 'if ($. == 1) { s{^(\#\!.*\n)?}{${1}$ENV{want}\n\n} }' "${1}" + want="${want}" perl -pi~ - "${1}" <<'EOF' +BEGIN { undef $/ } +s{^((\#\!.*?\n|\n*---\n.*?\n\.\.\.\n|<\?xml.*?>\n)\n?)?}{${2}$ENV{want}\n\n}ms +EOF } IFS=$'\n' read -a ignores -r -d $'\000' <.licenseignore || true result=0 -git ls-files -z ${@} | \ - while read -rd $'\000' fnm + +coproc git ls-files -z ${@}