From ccaddaf874ccb1e954eb78c36b235e6d606aeb5c Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 3 Nov 2024 19:37:52 -0500 Subject: check: Delete temp directory if 'git annex test' succeeds --- bin/check | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/check b/bin/check index fc1b75b..cf80b24 100755 --- a/bin/check +++ b/bin/check @@ -11,6 +11,8 @@ test -f "$tgz" || { exit 2 } +pwd_orig=$(pwd) + tdir=$(mktemp -d "${TMPDIR:-/tmp}"/static-annex-XXXXXXX) tar xzf "$tgz" -C "$tdir" cd "$tdir/git-annex-$version" @@ -32,3 +34,7 @@ command -v git-remote-annex | grep -qF "$base" command -v git-remote-tor-annex | grep -qF "$base" git annex test + +cd "$pwd_orig" +chmod -R 777 "$tdir" +rm -r "$tdir" -- cgit v1.2.3