aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild-aux/gitlog-to-emacslog9
1 files changed, 6 insertions, 3 deletions
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index 996f6d0ec7d..059cf81abc0 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -23,12 +23,14 @@ LC_ALL=C
23export LC_ALL 23export LC_ALL
24 24
25gen_origin=${1?} 25gen_origin=${1?}
26output=$2
27test -n "$output" || output=ChangeLog
26 28
27# If this is not a Git repository, just generate an empty ChangeLog. 29# If this is not a Git repository, just generate an empty ChangeLog.
28test -d ${srcprefix}.git || { 30test -d ${srcprefix}.git || {
29 # Remove any old ChangeLog, in case it is a vc-dwim symlink. 31 # Remove any old ChangeLog, in case it is a vc-dwim symlink.
30 rm -f "${distprefix}ChangeLog" || exit 32 rm -f "${distprefix}$output" || exit
31 >"${distprefix}ChangeLog" 33 >"${distprefix}$output"
32 exit 34 exit
33} 35}
34 36
@@ -78,4 +80,5 @@ if test -s "${distprefix}ChangeLog.tmp"; then
78fi 80fi
79 81
80# Install the generated ChangeLog. 82# Install the generated ChangeLog.
81mv -i "${distprefix}ChangeLog.tmp" "${distprefix}ChangeLog" 83test "$output" = "ChangeLog.tmp" || \
84 mv -i "${distprefix}ChangeLog.tmp" "${distprefix}$output"