From 29d6ef5ad07abf36da3d20c91d026f2457025dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Healy?= Date: Mon, 20 Apr 2026 17:01:32 +0100 Subject: [PATCH] Add more safety precautions. --- automation/apply.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/automation/apply.sh b/automation/apply.sh index d6c297f..9f0ffa6 100755 --- a/automation/apply.sh +++ b/automation/apply.sh @@ -13,4 +13,6 @@ git clone --depth 1 --branch main git@git.seanhealy.ie:sean/web-footer.git "$tmp echo Re-personalising HTML files... >&2 (cd "/tmp/web-footer" && ./automation/personalise.sh) echo Cleaning up... >&2 -rm -rf "$tmp_web_footer_dir" +if [ "$tmp_web_footer_dir" ] && [ -d "$tmp_web_footer_dir" ] && [ -d "$tmp_web_footer_dir/.git" ]; then + rm -rf "$tmp_web_footer_dir" +fi