]> code.delx.au - gnu-emacs/blobdiff - build-aux/gitlog-to-emacslog
; Auto-commit of ChangeLog files.
[gnu-emacs] / build-aux / gitlog-to-emacslog
index 4cf2ed619070c0b0b9ed87b875ce8284c76b90fd..b980dcae27840ae6881d8e904dca6f10a430e97f 100755 (executable)
@@ -23,7 +23,7 @@ LC_ALL=C
 export LC_ALL
 
 # The newest revision that should not appear in the generated ChangeLog.
-gen_origin=2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0
+gen_origin=325bf192ae281046834884b12705d6c522871b24
 force=
 output=ChangeLog
 nmax=2
@@ -39,20 +39,26 @@ while [ $# -gt 0 ]; do
   shift
 done
 
+if [ ! -f ChangeLog.$nmax ]; then
+    echo "Can't find ChangeLog.$nmax" >&2
+    echo "Must be run from the top source directory" >&2
+    exit 1
+fi
+
 if [ -f "$output" ]; then
-    [ ! "$force" ] && echo "$output exists" && exit 1
+    [ ! "$force" ] && echo "$output exists" >&2 && exit 1
     rm -f "$output" || exit 1
 fi
 
 # If this is not a Git repository, just generate an empty ChangeLog.
-test -d ${srcprefix}.git || {
+test -d .git || {
   >"$output"
   exit
 }
 
 # Use Gnulib's packaged ChangeLog generator.
-${srcprefix}build-aux/gitlog-to-changelog --ignore-matching='^; ' \
-  --format='%B' \
+./build-aux/gitlog-to-changelog --ignore-matching='^; ' \
+  --ignore-line='^; ' --format='%B' \
   "$gen_origin.." >"ChangeLog.tmp" || exit
 
 if test -s "ChangeLog.tmp"; then