diff --git a/export-cursor-handoff.sh b/export-cursor-handoff.sh new file mode 100755 index 0000000..e786c7e --- /dev/null +++ b/export-cursor-handoff.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Bundle Cursor rules + agent transcripts for secondary laptop handoff. +# Usage: sh export-cursor-handoff.sh [-o /path/to/ac-cursor-handoff.tgz] +set -eu + +OUT="${HOME}/ac-cursor-handoff-$(date +%Y%m%d).tar.gz" +while [ $# -gt 0 ]; do + case "$1" in + -o) OUT="${2:?}"; shift 2 ;; + -h|--help) sed -n '2,4p' "$0"; exit 0 ;; + *) echo "unknown: $1" >&2; exit 1 ;; + esac +done + +ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" +CURSOR_PROJ="${HOME}/.cursor/projects" +STAGE="$(mktemp -d)" +trap 'rm -rf "$STAGE"' EXIT + +mkdir -p "$STAGE/handoff" +[ -d "$ROOT/.cursor/rules" ] && cp -a "$ROOT/.cursor/rules" "$STAGE/handoff/" +[ -f "$ROOT/AGENTS.md" ] && cp "$ROOT/AGENTS.md" "$STAGE/handoff/" + +for d in "$CURSOR_PROJ"/*androidcast* "$CURSOR_PROJ"/*ac*; do + [ -d "$d" ] || continue + base="$(basename "$d")" + [ -d "$d/agent-transcripts" ] && cp -a "$d/agent-transcripts" "$STAGE/handoff/cursor-${base}-transcripts" +done + +tar czf "$OUT" -C "$STAGE" handoff +echo "wrote $OUT" +echo "see ac-docs/docs/CURSOR_SECONDARY_LAPTOP.md" diff --git a/fresh-clone-dev-env.sh b/fresh-clone-dev-env.sh index e8c99a3..ce4dff9 100755 --- a/fresh-clone-dev-env.sh +++ b/fresh-clone-dev-env.sh @@ -8,7 +8,7 @@ set -eu AC_GIT_BASE="${AC_GIT_BASE:-git://f0xx.org/ac}" AC_BRANCH="${AC_BRANCH:-next}" -TARGET="${TARGET:-${HOME}/src/androidcast-ac}" +TARGET="${TARGET:-${HOME}/repos/ac}" DO_VERIFY=1 usage() {