setup agent runtime requirements

This commit is contained in:
Harivansh Rathi 2026-04-01 04:36:36 +00:00
parent 5d97c33d7e
commit 016e0ee581
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"