Only delete files once.

This commit is contained in:
2026-04-19 22:58:20 +01:00
parent a31ff48998
commit 29fdf40fed

View File

@@ -16,6 +16,7 @@ function safely_remove_tmp_repos() {
function cleanup() { function cleanup() {
safely_remove_tmp_repos safely_remove_tmp_repos
} }
trap cleanup EXIT
directory="$1" directory="$1"
script_dir="$(dirname "$0")" script_dir="$(dirname "$0")"
if [ ! "$directory" ]; then 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." echo "Error: 'quarto' command not found. Please install Quarto to render project pages."
exit 1 exit 1
fi fi
trap cleanup EXIT
GIT_URL='https://git.seanhealy.ie' GIT_URL='https://git.seanhealy.ie'
GIT_USER=sean GIT_USER=sean
GITHUB_USER=seanhly GITHUB_USER=seanhly
@@ -219,4 +219,3 @@ else
mkdir -p "$directory" mkdir -p "$directory"
fi fi
rsync -a "$tmp_portfolio/" "$directory/" rsync -a "$tmp_portfolio/" "$directory/"
safely_remove_tmp_repos