#!/bin/sh
-git log --pretty=format:'<listitem>
+# two modes of operation:
+# 1) git-to-changelog auth-3.3.1.. > log.xml
+# then edit XML and insert into pdns.xml
+# 2) git log --pretty=format:'g%h: %s' auth-3.3.1.. > log.txt
+# then edit changelog as plain text
+# then run git-to-changelog - < log.txt > log.xml
+
+if [ "$1" = "-" ] ; then cat ; else git log --pretty=format:'g%h: %s' "$@" ; fi | perl -pe 's/\#(\d+)/t$1/g; s/(.*)/<listitem>
<para>
- g%h: %s
- </para>
-</listitem>' "$@" | perl -pe 's/\#(\d+)/t$1/g'
+ $1
+ <\/para>
+<\/listitem>/;'