abuild-sign: actually catch errors while signing

This commit is contained in:
Andrei Belov 2019-01-17 13:04:26 +03:00 committed by Natanael Copa
parent 57f2830739
commit 2d2be1ca1b

View File

@ -26,7 +26,7 @@ do_sign() {
i=$(readlink -f $f)
[ -d "$i" ] && i="$i/APKINDEX.tar.gz"
repo="${i%/*}"
(
trap 'die "failed to sign $i"' EXIT
set -e
cd "$repo"
sig=".SIGN.RSA.$keyname"
@ -39,7 +39,8 @@ do_sign() {
chmod 644 "$tmpsigned"
mv "$tmpsigned" "$i"
msg "Signed $i"
) || die "failed to sign $i"
set +e
trap - EXIT
done
}