Files
periscope/scripts/materialize-frontend.sh
T
michele c362ef8a56 Split native Periscope (periscope/src) from inherited PinScope (periscope/dependency).
Keep validate.py and the finding engine as-is. AGPL LICENSE stays at the repo root.
Docker overlays dependency then src. Do not delete the inherited tree.
2026-09-20 14:31:42 +02:00

21 lines
597 B
Bash
Executable File

#!/usr/bin/env bash
# Overlay PinScope frontend (dependency) with native Periscope files (src).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
DEST="${1:-"$ROOT/.merge/frontend"}"
python3 - "$ROOT" "$DEST" <<'PY'
import shutil
import sys
from pathlib import Path
root, dest = Path(sys.argv[1]), Path(sys.argv[2])
dep = root / "periscope" / "dependency" / "frontend"
src = root / "periscope" / "src" / "frontend"
if dest.exists():
shutil.rmtree(dest)
shutil.copytree(dep, dest, dirs_exist_ok=True)
if src.is_dir():
shutil.copytree(src, dest, dirs_exist_ok=True)
print(dest)
PY