1
0
mirror of git://f0xx.org/ac/ac-scripts synced 2026-07-29 02:59:20 +03:00

scripts: default ~/repos/ac clone path, Cursor handoff export

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-06-23 18:24:11 +02:00
parent affe70ac06
commit fb275ccada
2 changed files with 33 additions and 1 deletions

32
export-cursor-handoff.sh Executable file
View File

@@ -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"

View File

@@ -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() {