summaryrefslogtreecommitdiffstats
path: root/commitpkg
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-04-11 18:26:11 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-04-11 18:26:11 +0200
commit7037948b65dbdec542c7971d8c6f755168d6cb7e (patch)
tree876a32d8a66b90bf64d69363b74a9d4431b85f40 /commitpkg
parent0e6780f2c8a50c15f15bac0898b83c3e376e63cb (diff)
downloaddevtools-7037948b65dbdec542c7971d8c6f755168d6cb7e.tar.gz
devtools-7037948b65dbdec542c7971d8c6f755168d6cb7e.tar.xz
Add simple function to sign packages
Set SIGNPKG to y in makepkg.conf to enable signing.
Diffstat (limited to 'commitpkg')
-rwxr-xr-xcommitpkg7
1 files changed, 7 insertions, 0 deletions
diff --git a/commitpkg b/commitpkg
index ff28d0d..c57213b 100755
--- a/commitpkg
+++ b/commitpkg
@@ -130,9 +130,16 @@ for _arch in ${arch[@]}; do
fi
uploads+=("$pkgfile")
+ if [[ $SIGNPKG == 'y' ]]; then
+ echo "Signing package ${pkgfile}..."
+ gpg --detach-sign --use-agent -u "${PACKAGER}" "${pkgfile}" || abort
+ fi
+
sigfile="${pkgfile}.sig"
if [ -f "${sigfile}" ]; then
uploads+=("$sigfile")
+ elif [[ $SIGNPKG == 'y' ]]; then
+ abort "Signature ${pkgfile}.sig was not found"
fi
done
archrelease $repo-${_arch} || abort