release-tools/do-copyright-year: in file sed
authorRichard Levitte <levitte@openssl.org>
Tue, 13 Feb 2018 14:10:22 +0000 (15:10 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 13 Feb 2018 15:20:45 +0000 (16:20 +0100)
To make sure we don't lose file permissions, use sed -i

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12)

release-tools/do-copyright-year

index 829c55bc9aed21ab65d0f8bca0a2b9869358976e..6c3d7102b4279965f912d375e012735835d41daa 100755 (executable)
@@ -32,8 +32,7 @@ echo Updating copryight
 git diff-tree -r --name-status `git rev-list -1 --before=$NYD HEAD`..HEAD \
        | while read STATUS FILE ; do
     if [ "$STATUS" = 'D' ]; then continue; fi
-    sed -E -f /tmp/sed$$ "$FILE" >/tmp/$$
-    mv /tmp/$$ "$FILE"
+    sed -E -f /tmp/sed$$ -i "$FILE"
     git add "$FILE"
 done
 echo Committing change locally.