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
|
fi
|
||||||
|
|
||||||
# Define the cleanup routine for osslsigncode
|
# Define the cleanup routine for osslsigncode
|
||||||
cleanup() {
|
cleanup()
|
||||||
if [[ -n "$outname" && -f "${outname}.tmp" ]]; then
|
{
|
||||||
echo "Cleaning up: Removing ${outname}.tmp"
|
if [ -n "$outname" && -f "${outname}.tmp" ]; then
|
||||||
|
echo >&2 "Cleaning up: Removing ${outname}.tmp"
|
||||||
rm -f "${outname}.tmp"
|
rm -f "${outname}.tmp"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trap any error to call the cleanup routine
|
# Trap common signals and exit to run the cleanup
|
||||||
trap cleanup ERR SIGINT SIGTERM
|
trap cleanup 0 SIGINT SIGTERM
|
||||||
|
|
||||||
for v in AUTHENTICODE_SIGNHOST AUTHENTICODE_TOOL AUTHENTICODE_TSURL \
|
for v in AUTHENTICODE_SIGNHOST AUTHENTICODE_TOOL AUTHENTICODE_TSURL \
|
||||||
AUTHENTICODE_KEY AUTHENTICODE_CERTS VERSION_SIGNKEY \
|
AUTHENTICODE_KEY AUTHENTICODE_CERTS VERSION_SIGNKEY \
|
||||||
@ -261,7 +262,7 @@ elif [ "$AUTHENTICODE_KEY" = none ]; then
|
|||||||
echo >&2 "$PGM: Signing disabled; would sign: '$inname'"
|
echo >&2 "$PGM: Signing disabled; would sign: '$inname'"
|
||||||
[ "$inname" != "$outname" ] && cp "$inname" "$outname"
|
[ "$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"
|
echo >&2 "$PGM: Signing using PKCS#12 container $AUTHENTICODE_KEY"
|
||||||
osslsigncode sign -certs "$AUTHENTICODE_CERTS" \
|
osslsigncode sign -certs "$AUTHENTICODE_CERTS" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user