summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbuild-stuff11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbuild-stuff b/sbuild-stuff
index af08124..8ffbd93 100755
--- a/sbuild-stuff
+++ b/sbuild-stuff
@@ -20,6 +20,15 @@ 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
@@ -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