From 8cf50ac7c30d35bdc132951493112f7b048a9d9a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 2 May 2012 20:16:13 +0000 Subject: Handle signed .dsc files git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@526 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- sbuild-stuff | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sbuild-stuff b/sbuild-stuff index 27e3449..28dd961 100755 --- a/sbuild-stuff +++ b/sbuild-stuff @@ -20,11 +20,20 @@ if ! which changestool > /dev/null; then exit 1 fi +gpgcat() { + local f="$1" + if egrep -q "^-----BEGIN PGP SIGNED MESSAGE-----" "$f"; then + gpg < "$f" + else + cat "$f" + fi +} + get_metadata() { local dsc="$1"; shift dsc="$(readlink -f "$dsc")" - local origtar="$(dcmd --orig $dsc | grep orig.tar)" + local origtar="$(dcmd --orig $dsc)" if ! [ -e "$origtar" ]; then echo >&2 "File $origtar not found" exit 1 @@ -55,7 +64,7 @@ fi metadata="$(get_metadata "$DSC")" read dscdist debian_version <<< "$metadata" -sourcepkg="$(grep-dctrl -n -s Source '' "$DSC")" +sourcepkg="$(gpgcat "$DSC" | grep-dctrl -n -s Source '')" if [ -z "${ARCH:-}" ]; then if [ "`uname -m`" = "x86_64" ]; then -- cgit v1.2.3