#!/bin/sh # Prepare a source package for dgit-maint-merge(7) # TODO Generalise to some sort of script for any kind of project skeleton code if ! (git diff-index --quiet --cached HEAD && \ git diff-files --quiet && \ test -z "$(git status --porcelain)" \ ) >/dev/null 2>&1; then echo >&2 "please commit first" exit 1 fi if ! [ -f "debian/changelog" ]; then echo >&2 "this doesn't look like a source package" exit 1 fi if ! [ -d ".git" ]; then echo >&2 "please `git init`" exit 1 fi source=$(dpkg-parsechangelog -SSource) mkdir -p debian/source echo "single-debian-patch" >>debian/source/options echo "auto-commit" >>debian/source/options git add debian/source/options # TODO after substituting $source, word-wrap the paragraphs cat >debian/source/patch-header <