-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync-vault.sh
More file actions
executable file
·31 lines (25 loc) · 907 Bytes
/
Copy pathsync-vault.sh
File metadata and controls
executable file
·31 lines (25 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# sync-vault.sh — copies SharePoint Vault content into Quartz content/ directory.
# Run this whenever vault notes change, then push to trigger a redeploy.
# Usage: ./sync-vault.sh
set -e
VAULT="/Users/garithduncan/Desktop/SharePointVault"
CONTENT="$(cd "$(dirname "$0")" && pwd)/content"
echo "Syncing vault → content/..."
rsync -a --delete \
--exclude='.obsidian' \
--exclude='CLAUDE.md' \
--exclude='Templates' \
--exclude='*.base' \
--exclude='*.pdf' \
--exclude='.DS_Store' \
"$VAULT/" "$CONTENT/"
# Restore the handcrafted site homepage (lives outside the vault sync)
HOMEPAGE="$(dirname "$0")/site-homepage.md"
if [ -f "$HOMEPAGE" ]; then
cp "$HOMEPAGE" "$CONTENT/index.md"
fi
COUNT=$(find "$CONTENT" -name "*.md" | wc -l | tr -d ' ')
echo "✓ $COUNT notes synced to content/"
echo ""
echo "Next: git add -A && git commit -m 'Update vault content' && git push"