From 552f2e46f6ba95642ec454a523dcfeeaef98806a Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Wed, 27 Apr 2016 10:23:30 -0700 Subject: [PATCH] tiny shell script to automate debian release --- contrib/debian-release.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 contrib/debian-release.sh diff --git a/contrib/debian-release.sh b/contrib/debian-release.sh new file mode 100644 index 0000000..bceb75b --- /dev/null +++ b/contrib/debian-release.sh @@ -0,0 +1,26 @@ +#! /bin/bash +# +# + +set -e +set -x +set -o pipefail + +PACKAGE=$(dpkg-parsechangelog | awk '/Source:/{print $2}') +VERSION=$(dpkg-parsechangelog | awk -F'[- ]' '/Version:/{print $2}') + +PREFIX="${PACKAGE}-${VERSION}" +TARBALL="../${PACKAGE}_${VERSION}.orig.tar.xz" + +git archive \ + --format tar \ + --prefix "${PREFIX}/" \ + "${PREFIX}" \ + | xz \ + --compress \ + --to-stdout \ + > "${TARBALL}" + +exec debuild + +# -- end of file