setup agent runtime requirements (#7)

This commit is contained in:
Hari 2026-04-01 00:37:15 -04:00 committed by GitHub
parent 5d97c33d7e
commit e75b3f98a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 424 additions and 28 deletions

39
scripts/sync-clone Executable file
View file

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if [[ $# -ne 1 ]]; then
echo "usage: $0 /absolute/path/to/clone" >&2
exit 1
fi
clone_dir="$1"
if [[ "$clone_dir" != /* ]]; then
echo "clone path must be absolute: $clone_dir" >&2
exit 1
fi
if [[ ! -d "$clone_dir/.git" ]]; then
git clone --local --no-hardlinks "$repo_root" "$clone_dir"
fi
find "$clone_dir" -mindepth 1 -maxdepth 1 \
! -name .git \
! -name .env.agent \
-exec rm -rf {} +
tar \
--exclude=.git \
--exclude=.state \
--exclude=.turbo \
--exclude=node_modules \
--exclude=dist \
--exclude='apps/web/.next' \
-C "$repo_root" \
-cf - \
. | tar -C "$clone_dir" -xf -
echo "Synced working tree into $clone_dir"