From 29fdf40fed631c162b4da45064ac472293b6fe8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Healy?= Date: Sun, 19 Apr 2026 22:58:20 +0100 Subject: [PATCH] Only delete files once. --- git-portfolio | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-portfolio b/git-portfolio index 2106a22..b08b5f0 100755 --- a/git-portfolio +++ b/git-portfolio @@ -16,6 +16,7 @@ function safely_remove_tmp_repos() { function cleanup() { safely_remove_tmp_repos } +trap cleanup EXIT directory="$1" script_dir="$(dirname "$0")" if [ ! "$directory" ]; then @@ -38,7 +39,6 @@ if ! command -v quarto >/dev/null 2>&1; then echo "Error: 'quarto' command not found. Please install Quarto to render project pages." exit 1 fi -trap cleanup EXIT GIT_URL='https://git.seanhealy.ie' GIT_USER=sean GITHUB_USER=seanhly @@ -219,4 +219,3 @@ else mkdir -p "$directory" fi rsync -a "$tmp_portfolio/" "$directory/" -safely_remove_tmp_repos