abuild-sign: fix a race condition

This commit is contained in:
Dubiousjim 2013-07-05 00:21:24 -04:00 committed by Natanael Copa
parent ad61123797
commit 7a628e7dc4

View File

@ -35,8 +35,8 @@ do_sign() {
tmpsigned=$(mktemp)
cat "$tmptargz" "$i" > "$tmpsigned"
rm -f "$tmptargz" "$sig"
chmod 644 "$tmpsigned"
mv "$tmpsigned" "$i"
chmod 644 "$i"
if [ -z "$quiet" ]; then
echo "Signed $i"
fi