Add script to create signed tarballs for upload (#193)
diff --git a/expat/.gitignore b/expat/.gitignore
index 50cd624..6e90164 100755
--- a/expat/.gitignore
+++ b/expat/.gitignore
@@ -35,4 +35,5 @@
 coverage__R*
 source__R*
 /expat-*.tar.bz2
+/expat-*.tar.bz2.asc
 /stamp-h1
diff --git a/expat/distribute.sh b/expat/distribute.sh
new file mode 100755
index 0000000..50829d1
--- /dev/null
+++ b/expat/distribute.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2018 Sebastian Pipping <sebastian@pipping.org>
+# Licensed under the MIT license
+#
+# Creates release tarball and detached GPG signature file for upload
+
+set -e
+
+PS4='# '
+set -x
+
+version="$(./conftools/get-version.sh lib/expat.h)"
+archive=expat-${version}.tar.bz2
+
+./buildconf.sh
+./configure
+make distcheck
+
+gpg --armor --output ${archive}.asc --detach-sign ${archive}
+gpg --verify ${archive}.asc ${archive}