SPB Git

Repository Public License

screenshots.sh 2.9 KB 42 lines shellscript

1#!/usr/bin/env bash2# ORIX Clean — Scripts/screenshots.sh3# Description: Captures the README screenshots from the real app (Debug build) running on the generated sample home folder.4#              The sample lives on a disposable disk image, so the cleanup shown in the "results" screenshot uses that image's Trash.5#              History screenshots use real volume samples of this Mac from ORIX_HISTORY_DB when given.6# Author: Simon-Pierre Boucher — contact@spboucher.ai7set -euo pipefail8cd "$(dirname "$0")/.."9OUT="docs/screenshots"; MNT=/tmp/orix-demo; IMG=/tmp/orix-demo.sparseimage10EN=(-AppleLanguages "(en)" -AppleLocale en_CA); FR=(-AppleLanguages "(fr-CA)" -AppleLocale fr_CA)11hdiutil detach "$MNT" -force -quiet 2>/dev/null || true12rm -rf "$MNT" "$IMG"; mkdir -p "$MNT" "$OUT"13hdiutil create -size 4g -type SPARSE -fs APFS -volname "ORIX Sample" -quiet "${IMG%.sparseimage}"14hdiutil attach "$IMG" -nobrowse -mountpoint "$MNT" -quiet -owners on15Packages/ORIXCleanCore/.build/release/orix-bench fixture "$MNT/home" 1 >/dev/null16export ORIX_DEMO_HOME="$MNT/home"17HIST=memory18if [[ -n "${ORIX_HISTORY_DB:-}" && -f "$ORIX_HISTORY_DB" ]]; then rm -f /tmp/orix-shot-history.sqlite*; sqlite3 "$ORIX_HISTORY_DB" ".backup /tmp/orix-shot-history.sqlite"; HIST=/tmp/orix-shot-history.sqlite; fi19shot() { local name="$1" section="$2" look="$3"; shift 3; Scripts/shot.sh "$OUT/$name.png" "$section" "$look" "$@" >/dev/null && echo "$name"; }20ORIX_WAIT=7 shot 01-overview overview dark "${EN[@]}"21ORIX_WAIT=6 shot 02-storage-map map dark "${EN[@]}"22ORIX_WAIT=6 shot 03-large-files largeFiles dark "${EN[@]}"23ORIX_WAIT=8 shot 04-duplicates duplicates dark "${EN[@]}" -ORIXDemoSelect duplicates24ORIX_WAIT=8 shot 05-similar-images similar dark "${EN[@]}"25ORIX_WAIT=7 shot 06-cache-cleanup caches dark "${EN[@]}" -ORIXDemoSelect caches26ORIX_WAIT=8 shot 07-uninstall-assistant applications dark "${EN[@]}" -ORIXDemoSelect uninstall27ORIX_WAIT=7 shot 08-developer-cleanup developer dark "${EN[@]}"28ORIX_WAIT=8 ORIX_FRONT=1 shot 09-cleanup-preview caches dark "${EN[@]}" -ORIXDemoSelect caches -ORIXDemoPreview YES29ORIX_WAIT=7 shot 12-reports reports dark "${EN[@]}"30ORIX_WAIT=6 shot 16-downloads downloads dark "${EN[@]}"31ORIX_WAIT=6 shot 17-trash trash dark "${EN[@]}"32ORIX_WAIT=6 shot 18-actions actions dark "${EN[@]}"33ORIX_WAIT=6 ORIX_FRONT=1 shot 13-settings overview dark "${EN[@]}" -ORIXOpenSettings YES34ORIX_WAIT=7 shot 14-light-mode overview light "${EN[@]}"35ORIX_WAIT=6 shot 15-storage-map-light map light "${EN[@]}"36ORIX_WAIT=7 shot 19-french-canadian map dark "${FR[@]}"37ORIX_STORE="$HIST" ORIX_WAIT=6 shot 11-storage-history history dark "${EN[@]}"38# Last: a real cleanup of the sample caches (moves them to the Trash of the sample disk image).39ORIX_WAIT=9 ORIX_FRONT=1 shot 10-cleanup-results caches dark "${EN[@]}" -ORIXDemoSelect caches -ORIXDemoConfirm YES40hdiutil detach "$MNT" -force -quiet || true; rm -f "$IMG" /tmp/orix-shot-history.sqlite*41ls "$OUT" | wc -l42
Files main
Menu

Theme