From 7037948b65dbdec542c7971d8c6f755168d6cb7e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 11 Apr 2011 18:26:11 +0200 Subject: Add simple function to sign packages Set SIGNPKG to y in makepkg.conf to enable signing. --- commitpkg | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3-24-g4f1b