release-tools/do-copyright-year: Modify files with more care
Files were modified by running a simple in-place sed (i.e. 'sed -i').
This turns out to update the modification time on every file, even those
that remain unmodified.
The effect is that time stamps in a source directory become unreliable,
causing configdata.pm to be "mysteriously" older than (unmodified) files it
depends on, which causes a spurious reconfiguration when running 'make'
again.
To mediate, the loop is modified to take copies of the original files, run
an in-place sed on those, and only move them back to the original files if
there were any actual modifications. That should leave time stamps alone on
unmodified files.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/151)