mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tools: Fix bashishm
-- Fixes-commit: 536fc8d33db571108459493d1881cdfc8371d3cc
This commit is contained in:
parent
3d015d106f
commit
2f46029bec
@ -184,15 +184,16 @@ if [ ! -f $autogenrc ]; then
|
||||
fi
|
||||
|
||||
# Define the cleanup routine for osslsigncode
|
||||
cleanup() {
|
||||
if [[ -n "$outname" && -f "${outname}.tmp" ]]; then
|
||||
echo "Cleaning up: Removing ${outname}.tmp"
|
||||
cleanup()
|
||||
{
|
||||
if [ -n "$outname" && -f "${outname}.tmp" ]; then
|
||||
echo >&2 "Cleaning up: Removing ${outname}.tmp"
|
||||
rm -f "${outname}.tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
# Trap any error to call the cleanup routine
|
||||
trap cleanup ERR SIGINT SIGTERM
|
||||
# Trap common signals and exit to run the cleanup
|
||||
trap cleanup 0 SIGINT SIGTERM
|
||||
|
||||
for v in AUTHENTICODE_SIGNHOST AUTHENTICODE_TOOL AUTHENTICODE_TSURL \
|
||||
AUTHENTICODE_KEY AUTHENTICODE_CERTS VERSION_SIGNKEY \
|
||||
@ -261,7 +262,7 @@ elif [ "$AUTHENTICODE_KEY" = none ]; then
|
||||
echo >&2 "$PGM: Signing disabled; would sign: '$inname'"
|
||||
[ "$inname" != "$outname" ] && cp "$inname" "$outname"
|
||||
|
||||
elif [[ "$AUTHENTICODE_KEY" =~ \.p12$ || "$AUTHENTICODE_KEY" =~ \.pfx$ ]]; then
|
||||
elif [ -n $(echo "$AUTHENTICODE_KEY" | egrep "\.(pfx|p12)$") ]; then
|
||||
|
||||
echo >&2 "$PGM: Signing using PKCS#12 container $AUTHENTICODE_KEY"
|
||||
osslsigncode sign -certs "$AUTHENTICODE_CERTS" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user