Files
Pier_v1/scripts/capture-sample.sh
T
CopilotandCopilot 06e1b97a62
ITAM Code Check / build-and-config-check (push) Failing after 37s
ITAM Docker Build Check / docker-build-check (push) Failing after 1m0s
교각 프로그램 초기 버전
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 15:55:01 +09:00

13 lines
667 B
Bash

#!/usr/bin/env bash
# Headless Chrome screenshot of the sample page (WSL2 → Windows Chrome).
# Usage: scripts/capture-sample.sh <output.png> [url]
# Requires the dev server: npm run dev -- --host 127.0.0.1 --port 5173
set -euo pipefail
OUT_WSL="${1:?output png path (WSL path)}"
URL="${2:-http://127.0.0.1:5173/?sample=1}"
CHROME="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
mkdir -p "$(dirname "$OUT_WSL")"
timeout 200 "$CHROME" --headless=new --no-sandbox --use-gl=angle --use-angle=swiftshader \
--enable-unsafe-swiftshader --enable-logging=stderr --v=0 --window-size=1600,1000 \
--timeout=45000 --screenshot="$(wslpath -w "$OUT_WSL")" "$URL"