fixing problem with trap not removing tempdir

- needs to be in original dir to work
This commit is contained in:
Adam Feuer 2020-07-06 12:51:34 -07:00 committed by Xiang Xiao
parent 1076b748a2
commit b994d1f0b6

View File

@ -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"