#!/bin/bash
set -e
cd "$(dirname "$0")"
OUT_HTML="dist/okelis-design-direction.html"
OUT_PDF="dist/OKELIS-Design-Direction-v1.pdf"
cat src/00-head.html src2/d*.html src/99-foot.html > "$OUT_HTML"
sed -i '' 's|OKELIS — Corporate Portfolio (Draft v1)|OKELIS — Design Direction \& Structure|' "$OUT_HTML"
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
"$CHROME" --headless --disable-gpu --no-pdf-header-footer \
  --print-to-pdf="$PWD/$OUT_PDF" --virtual-time-budget=8000 \
  "file://$PWD/$OUT_HTML" 2>/dev/null
echo "→ $OUT_PDF"
