chiark / gitweb /
add ubuntu-make-mergelog convenience wrapper around dch
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 15 Apr 2008 16:11:20 +0000 (16:11 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 15 Apr 2008 16:11:20 +0000 (16:11 +0000)
ubuntu-make-mergelog [new file with mode: 0755]

diff --git a/ubuntu-make-mergelog b/ubuntu-make-mergelog
new file mode 100755 (executable)
index 0000000..1d3899d
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+set -e
+
+LOG="$(dpkg-parsechangelog)"
+SOURCE="$(echo "$LOG" | awk '/^Source:/ { print $2 }')"
+VERSION="$(echo "$LOG" | awk '/^Version:/ { print $2 }')"
+VERSION_NOEPOCH="${VERSION#*:}"
+
+CURDIR="$(pwd)"
+
+dch -v"${VERSION}ubuntu1" -D UNRELEASED 'Resynchronise with Debian. Remaining changes:'
+
+if [ "${CURDIR##*/}" = "$SOURCE-$VERSION_NOEPOCH" ]; then
+       echo cd "${CURDIR}ubuntu1"
+fi