2026-07-07 14:05:36 -07:00
|
|
|
#!/bin/sh
|
2026-07-08 15:02:13 -07:00
|
|
|
# Sync the current project if it is a beardrive project (has a .bdrive/ settings dir).
|
2026-07-07 14:05:36 -07:00
|
|
|
# Fast no-op otherwise, so this hook is safe on every turn in every project.
|
|
|
|
|
#
|
|
|
|
|
# Runs blocking on UserPromptSubmit (fresh files before Claude reads them)
|
|
|
|
|
# and async on Stop (push edits out without delaying the turn).
|
|
|
|
|
cd "${CLAUDE_PROJECT_DIR:-.}" || exit 0
|
2026-07-08 15:02:13 -07:00
|
|
|
[ -d .bdrive ] || exit 0
|
2026-07-07 15:02:40 -07:00
|
|
|
command -v bdrive >/dev/null 2>&1 || exit 0
|
|
|
|
|
bdrive sync . >/dev/null 2>&1 || true
|