fixCopyright 608 B

12345678910111213141516171819
  1. #! /usr/bin/perl
  2. #
  3. # grep -l -r Copyright unpacked/ test | xargs -L 1 ./fixCopyright
  4. #
  5. foreach $file (@ARGV) {
  6. next if ($file =~ m/\/confg\//);
  7. next if ($file =~ m/\/extensions\/TeX\/mhchem3\//);
  8. next if ($file =~ m/\/extensions\/a11y\/wgxpath\.install\.js/);
  9. open(INFILE,"<",$file) || die "Can't open '$file' for reading: $!\n";
  10. @lines = <INFILE>; close(INFILE);
  11. $lines = join("",@lines);
  12. $lines =~ s/Design Science, Inc\./The MathJax Consortium/;
  13. $lines =~ s/(Copyright \(c\)) (\d\d\d\d)(-(\d\d)?\d\d)?/$1 $2-2018/;
  14. open(OUTFILE,">",$file);
  15. print OUTFILE $lines;
  16. close(OUTFILE);
  17. }