mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
build-aux: Add cleanup to gpg-authcode-sign.sh
* tools/gpg-authcode-sign.sh (cleanup): New. -- When using osslsigncode it does not delete the output file on error. Errors or cancels there can happen easily with either timestamp problems or a wrong password. Additionally, if an output file exists, osslsigncode does not write a good error message but shows some exception.
This commit is contained in:
parent
d80345244c
commit
536fc8d33d
@ -183,6 +183,16 @@ if [ ! -f $autogenrc ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the cleanup routine for osslsigncode
|
||||
cleanup() {
|
||||
if [[ -n "$outname" && -f "${outname}.tmp" ]]; then
|
||||
echo "Cleaning up: Removing ${outname}.tmp"
|
||||
rm -f "${outname}.tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
# Trap any error to call the cleanup routine
|
||||
trap cleanup ERR SIGINT SIGTERM
|
||||
|
||||
for v in AUTHENTICODE_SIGNHOST AUTHENTICODE_TOOL AUTHENTICODE_TSURL \
|
||||
AUTHENTICODE_KEY AUTHENTICODE_CERTS VERSION_SIGNKEY \
|
||||
|
Loading…
x
Reference in New Issue
Block a user