From: Tom Clegg Date: Wed, 28 Jun 2017 13:54:23 +0000 (-0400) Subject: 2411: Fix liquid comment template and skip top matter in docs. X-Git-Tag: 1.1.0~168^2~10 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/622d86f9541c1d7d1971d6e4ad08478ade192212 2411: Fix liquid comment template and skip top matter in docs. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- 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 ;;