From 89cc3ff3f933c463fd93e66aa9b8f67e50fd695d Mon Sep 17 00:00:00 2001 From: Jon Shaulis Date: Thu, 15 Sep 2016 21:20:42 -0400 Subject: [PATCH] Move trap call to cleanup function --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 570911b..204ec1c 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -365,6 +365,7 @@ function cleanup { rm /tmp/raw 2>/dev/null >/dev/null rm /tmp/failcause 2>/dev/null >/dev/null rm /tmp/kaka 2>/dev/null >/dev/null + rm "${DOWNLOADDIR}/${FILENAME}.sha" 2>/dev/null >/dev/null } trap cleanup EXIT @@ -471,7 +472,6 @@ if [ $? -ne 0 ]; then fi echo "${CHECKSUM} ${DOWNLOADDIR}/${FILENAME}" >"${DOWNLOADDIR}/${FILENAME}.sha" -trap "rm ${DOWNLOADDIR}/${FILENAME}.sha" EXIT if [ "${PRINT_URL}" = "yes" ]; then if [ "${QUIET}" = "yes" ]; then