From b994d1f0b6c46cfef00c44551b4d955ef8133dc3 Mon Sep 17 00:00:00 2001 From: Adam Feuer Date: Mon, 6 Jul 2020 12:51:34 -0700 Subject: [PATCH] fixing problem with trap not removing tempdir - needs to be in original dir to work --- tools/checkrelease.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/checkrelease.sh b/tools/checkrelease.sh index 2f2ddd1312..5677836bdc 100755 --- a/tools/checkrelease.sh +++ b/tools/checkrelease.sh @@ -24,7 +24,7 @@ set -e BASE_URL="https://dist.apache.org/repos/dist/dev/incubator/nuttx" TEMPDIR="dist.apache.org" ORIGINAL_DIR="$(pwd)" -trap "rm -rf $TEMPDIR" EXIT +trap "{ cd $ORIGINAL_DIR; rm -rf $TEMPDIR; }" EXIT function download_release() { wget -r -np -R "index.html*" -P . --cut-dirs 7 "$URL"