#!/usr/bin/env sh # Captures all website screenshots from the released Ink AppImage into src/assets/screens/. # Usage: scripts/capture/run.sh Ink-1.0.0-beta-x86_64.AppImage (env: OUT, SCENES) set -e HERE="$(cd "$(dirname "$0")" && pwd)" APPIMAGE="$(realpath "${1:-${INK_APPIMAGE:?pass the AppImage path}}")" WORK="$(mktemp -d)" trap 'rm -rf "$WORK"' EXIT # Extract in an empty directory of its own; the AppImage is only unpacked, never run from here. (cd "$WORK" && cp "$APPIMAGE" ink.AppImage && chmod +x ink.AppImage && ./ink.AppImage --appimage-extract >/dev/null) export INK_BIN="$WORK/squashfs-root/ink" for theme in dark light; do THEME=$theme node "$HERE/capture.cjs" 2>&1 | grep -E 'saved|FAILED|Error' || true done