19 lines
692 B
Bash
Executable File
19 lines
692 B
Bash
Executable File
#!/usr/bin/bash
|
|
dst=/root/data/small/caddy/srv/seanhealy.ie/projects
|
|
dst_dir=$(dirname "$dst")
|
|
if [ ! -d "$dst_dir" ]; then
|
|
echo "Destination directory does not exist: $dst_dir"
|
|
exit 1
|
|
fi
|
|
mkdir -p "$dst_dir"
|
|
./git-portfolio "$dst"
|
|
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"
|
|
echo Re-personalising HTML files... >&2
|
|
(cd "/tmp/web-footer" && ./automation/personalise.sh)
|
|
echo Cleaning up... >&2
|
|
if [ "$tmp_web_footer_dir" ] && [ -d "$tmp_web_footer_dir" ] && [ -d "$tmp_web_footer_dir/.git" ]; then
|
|
rm -rf "$tmp_web_footer_dir"
|
|
fi
|