#!/bin/sh

set -eu

ROOT_DIR="$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)"
TARGET_DIR="$ROOT_DIR/.docker/theme/ghost-theme-thred-clone"

mkdir -p "$TARGET_DIR"

rsync -a --delete \
  --exclude='.git/' \
  --exclude='.cursor/' \
  --exclude='.vscode/' \
  --exclude='.docker/' \
  --exclude='docs/' \
  --exclude='local-ghost/' \
  --exclude='seed/' \
  --exclude='theme-export/' \
  --exclude='scripts/' \
  --exclude='*.zip' \
  --exclude='AGENTS.md' \
  --exclude='.DS_Store' \
  --exclude='.gitignore' \
  "$ROOT_DIR/" "$TARGET_DIR/"

printf 'Synced theme files to %s\n' "$TARGET_DIR"
