#!/bin/sh set -eu pkg="$(dpkg-parsechangelog -S Source)" version="$(dpkg-parsechangelog -S Version)" upversion="$(echo "$version" | sed 's/-.*//')" origtgz="../${pkg}_${upversion}.orig.tar.xz" git archive HEAD | xz > "$origtgz" debuild -us -uc