Add safeguard for failed clone.

This commit is contained in:
2026-04-20 17:06:03 +01:00
parent b2fe7f7a7f
commit 26c115b7e1
2 changed files with 5 additions and 1 deletions

View File

@@ -10,6 +10,10 @@ mkdir -p "$dst_dir"
tmp_web_footer_dir="/tmp/web-footer-$(date +%N)" tmp_web_footer_dir="/tmp/web-footer-$(date +%N)"
echo Cloning web-footer to "$tmp_web_footer_dir"... >&2 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" 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 echo Re-personalising HTML files... >&2
(cd "$tmp_web_footer_dir" && ./automation/personalise.sh) (cd "$tmp_web_footer_dir" && ./automation/personalise.sh)
echo Cleaning up... >&2 echo Cleaning up... >&2

View File

@@ -1 +1 @@
apply when modified:(/git-portfolio or automation/apply.sh) apply when modified:(/git-portfolio or /automation/apply.sh)