#172: Fix copyright years
------------------------+---------------------------------------------------
  Reporter:  vengmark   |       Owner:  simko    
      Type:  defect     |      Status:  closed   
  Priority:  major      |   Milestone:  v1.0     
 Component:  *general*  |     Version:  v0.99.1  
Resolution:  fixed      |    Keywords:  copyright
------------------------+---------------------------------------------------

Comment (by simko):

 For the record, I have used the following one-liner:

 {{{
 git log --pretty=format:"%ai" $1 | awk '{print substr($0,0,4);}' | sort -n
 | uniq | \
 awk 'BEGIN {printf "Copyright (C) ";} NR > 0 {printf "%s, ", $1;} END
 {print CERN."}'
 }}}

 to detect the copyright years of a file, and called it called like
 this:

 {{{
 for file in $(git ls-files); do
     MSG=$(invenio-generate-copyright $file);
     perl -pi~ -e "s/Copyright \(C\) 2.* CERN\.$/$MSG/g" $file;
 done
 }}}

 to update all the files.

-- 
Ticket URL: <http://invenio-software.org/ticket/172#comment:4>
Invenio <http://invenio-software.org>

Reply via email to