Check that copyright year will be current year in generated documentation.

Checking is done my matching that copyright line contains current year
as a substring which is good enough "approximation" in this context.

v2 of, perhaps
addressing comments in

 devel/ | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/devel/ b/devel/
index 8604a9f7d10b..5802942aa975 100755
--- a/devel/
+++ b/devel/
@@ -175,6 +175,21 @@ case $news_date in
        append_emsg "Date '$news_date' in NEWS file is not in format 
+year=`exec date +%Y`
+echo -n "Checking that copyright in documentation contains $year... "
+# Read the value of variable `copyright' defined in 'doc/'.
+# As __file__ is not defined when python command is given from command line,
+# it is defined before contents of 'doc/' (which dereferences __file__)
+# is executed.
+copyrightline=`exec python -c "with open('doc/') as cf: __file__ = ''; 
exec(; print(copyright)"`
+case $copyrightline in
+       *$year*)
+               echo Yes. ;;
+       *)
+               echo No.
+               append_emsg "The copyright in doc/ line '$copyrightline' 
does not contain '$year'"
 if [ -n "$emsgs" ]

notmuch mailing list

Reply via email to