From 26c115b7e10562cb930759a5522d8c251e9ffe61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Healy?= Date: Mon, 20 Apr 2026 17:06:03 +0100 Subject: [PATCH] Add safeguard for failed clone. --- automation/apply.sh | 4 ++++ automation/rules | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/automation/apply.sh b/automation/apply.sh index ba144d5..67d3ae8 100755 --- a/automation/apply.sh +++ b/automation/apply.sh @@ -10,6 +10,10 @@ mkdir -p "$dst_dir" tmp_web_footer_dir="/tmp/web-footer-$(date +%N)" echo Cloning web-footer to "$tmp_web_footer_dir"... >&2 git clone --depth 1 --branch main git@git.seanhealy.ie:sean/web-footer.git "$tmp_web_footer_dir" +if [ $? != 0 ] || [ ! -d "$tmp_web_footer_dir" ]; then + echo "Failed to clone web-footer repository." >&2 + exit 1 +fi echo Re-personalising HTML files... >&2 (cd "$tmp_web_footer_dir" && ./automation/personalise.sh) echo Cleaning up... >&2 diff --git a/automation/rules b/automation/rules index c9f5187..42d5860 100644 --- a/automation/rules +++ b/automation/rules @@ -1 +1 @@ -apply when modified:(/git-portfolio or automation/apply.sh) +apply when modified:(/git-portfolio or /automation/apply.sh)