aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2023-08-08 07:51:43 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2023-08-08 07:51:43 -0700
commit231c9cfb0b64c3c566d89f0cd1ae5b0b124a9f25 (patch)
tree4c73ef6029204f7dfb30d70687aad8f8e3b12213 /sign-sync-binpackages.sh
parentsnapshots-create.sh: hopefully make this script entirely quiet for normal runs (diff)
downloadmastermirror-scripts-231c9cfb0b64c3c566d89f0cd1ae5b0b124a9f25.tar.gz
mastermirror-scripts-231c9cfb0b64c3c566d89f0cd1ae5b0b124a9f25.tar.bz2
mastermirror-scripts-231c9cfb0b64c3c566d89f0cd1ae5b0b124a9f25.zip
*: fix trap calls to ensure call on regular exit and errors20230808T145156Z
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'sign-sync-binpackages.sh')
-rwxr-xr-xsign-sync-binpackages.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sign-sync-binpackages.sh b/sign-sync-binpackages.sh
index 862cea9..4c85365 100755
--- a/sign-sync-binpackages.sh
+++ b/sign-sync-binpackages.sh
@@ -53,9 +53,9 @@ if [[ -f ${LOCKFILE} ]] ; then
echo sign-sync-binpackages.sh lockfile ${LOCKFILE} exists, aborting
exit 112
fi
-touch ${LOCKFILE} || exit 110
+touch "${LOCKFILE}" || exit 110
# ensure the lock is cleaned on exit
-trap "rm -f ${LOCKFILE}" SIGINT SIGTERM
+trap 'rm -f "${LOCKFILE}"' SIGINT SIGTERM EXIT
# make sure we have an updated gpg-agent
gpgconf --kill all