abuild-sign: remove temp signature

This commit is contained in:
Natanael Copa 2009-11-02 18:33:30 +00:00
parent 9400ec0152
commit b35b56943e

View File

@ -73,12 +73,11 @@ for f in "$@"; do
cd "$repo" || die "Failed to sign $i" cd "$repo" || die "Failed to sign $i"
sig=".SIGN.RSA.$keyname" sig=".SIGN.RSA.$keyname"
openssl dgst -sha1 -sign "$privkey" -out "$sig" "$i" || die "Failed to sign $i" openssl dgst -sha1 -sign "$privkey" -out "$sig" "$i" || die "Failed to sign $i"
cd "$repo"
tmptargz=$(mktemp) tmptargz=$(mktemp)
tar -c "$sig" | abuild-tar --cut | gzip -9 > "$tmptargz" tar -c "$sig" | abuild-tar --cut | gzip -9 > "$tmptargz"
tmpsigned=$(mktemp) tmpsigned=$(mktemp)
cat "$tmptargz" "$i" > "$tmpsigned" cat "$tmptargz" "$i" > "$tmpsigned"
rm -f "$tmptargz" rm -f "$tmptargz" "$sig"
mv "$tmpsigned" "$i" mv "$tmpsigned" "$i"
chmod 644 "$i" chmod 644 "$i"
if [ -z "$quiet" ]; then if [ -z "$quiet" ]; then