2025-06-20 14:52:51 +01:00
|
|
|
set unstable
|
|
|
|
|
2025-06-20 14:21:33 +01:00
|
|
|
update:
|
2025-06-20 14:52:51 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if ! git diff --cached --quiet; then \
|
|
|
|
echo "Error: there are pre-existing staged changes" && exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
rsync -rv --delete $HOME/brain/brain/public/ content/
|
|
|
|
git add content/
|
|
|
|
|
2025-06-20 15:16:54 +01:00
|
|
|
git diff --stat
|
|
|
|
|
2025-06-20 14:52:51 +01:00
|
|
|
if ! git diff --cached --quiet; then \
|
|
|
|
export TIMESTAMP=$(date -u +"%Y-W%V-%u %H:%M:%S"); \
|
|
|
|
git commit -m "checkpoint: ${TIMESTAMP}"; \
|
2025-06-20 15:16:54 +01:00
|
|
|
git push origin main; \
|
2025-06-20 14:52:51 +01:00
|
|
|
fi
|