From 622d86f9541c1d7d1971d6e4ad08478ade192212 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 28 Jun 2017 09:54:23 -0400 Subject: [PATCH] 2411: Fix liquid comment template and skip top matter in docs. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- build/check-copyright-notices | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/check-copyright-notices b/build/check-copyright-notices index aef14fa6ad..41576c3ffa 100755 --- a/build/check-copyright-notices +++ b/build/check-copyright-notices @@ -41,7 +41,10 @@ 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\n?)?}{${1}$ENV{want}\n\n}ms +EOF } IFS=$'\n' read -a ignores -r -d $'\000' <.licenseignore || true @@ -113,7 +116,7 @@ git ls-files -z ${@} | \ fixer=fixer cs=$'{% comment %}\n' cc= - ce=$'\n%{% endcomment %}' + ce=$'\n{% endcomment %}' grepAfter=3 grepBefore=1 ;; -- 2.30.2