summaryrefslogtreecommitdiff
path: root/build-aux/gitlog-to-emacslog
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-04-09 09:50:48 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-04-09 09:51:09 -0700
commit3311ace9c54a50b83a838e2eb7fa9565176e0c4f (patch)
tree1473f5770521580e0fff4e1fdb192f31dd883d41 /build-aux/gitlog-to-emacslog
parent4e642454bdc7d4bbdf869655d61843888ceee7af (diff)
downloademacs-3311ace9c54a50b83a838e2eb7fa9565176e0c4f.tar.gz
gitlog-to-changelog coding cookie and mv -i
* build-aux/gitlog-to-emacslog: Use ChangeLog.1, not Makefile.in, for copyright notice prototype, so that we get a proper "coding:" cookie. Use 'mv -i' to avoid unconditionally overwriting an existing ChangeLog. Problems reported by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00504.html
Diffstat (limited to 'build-aux/gitlog-to-emacslog')
-rwxr-xr-xbuild-aux/gitlog-to-emacslog15
1 files changed, 9 insertions, 6 deletions
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index 553607ae299..a523d861611 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -58,12 +58,15 @@ if test -s "${distprefix}ChangeLog.tmp"; then
fi
# Append a proper copyright notice.
- sed "1d
- s/\\(Copyright[ (C)]*\\)[0-9]*-[0-9]*/\\1$year_range/
- s/^# //
- /http:/q
- " <Makefile.in >>"${distprefix}ChangeLog.tmp" || exit
+ sed -n '
+ 1i\
+
+ /^;; Local Variables:/,${
+ s/\(Copyright[ (C)]*\)[0-9]*-[0-9]*/\1'"$year_range"'/
+ p
+ }
+ ' <ChangeLog.1 >>"${distprefix}ChangeLog.tmp" || exit
fi
# Install the generated ChangeLog.
-mv -f "${distprefix}ChangeLog.tmp" "${distprefix}ChangeLog"
+mv -i "${distprefix}ChangeLog.tmp" "${distprefix}ChangeLog"