#!/usr/bin/env bash
# Usage: bash seed.sh CHECKOUT SAMPLE_DIRECTORY
# Run each checkout's dev server with T3CODE_DEV_SEED=0 first.
set -eu
checkout=$1
sample=$2
mkdir -p "$sample"
printf 'export const greeting = "Hello from the demo";\n' > "$sample/hello.ts"
git -C "$sample" init -q
cd "$checkout"
node apps/server/src/bin.ts project add --base-dir .t3 --title 'File menu demo' "$sample"
