#!/bin/sh # Regenerate the PWA icon PNGs from the vector sources in assets/icons/. # The PNGs are committed (like the card art) because the Docker builder has # no SVG rasterizer; run this only after editing icon.svg or # icon-maskable.svg. Requires rsvg-convert (librsvg). set -eu ICONS="$(dirname "$0")/assets/icons" rsvg-convert -w 192 -h 192 "$ICONS/icon.svg" -o "$ICONS/icon-192.png" rsvg-convert -w 512 -h 512 "$ICONS/icon.svg" -o "$ICONS/icon-512.png" rsvg-convert -w 512 -h 512 "$ICONS/icon-maskable.svg" -o "$ICONS/icon-maskable-512.png" # iOS masks the home-screen icon itself; a full-bleed square is expected. rsvg-convert -w 180 -h 180 "$ICONS/icon-maskable.svg" -o "$ICONS/apple-touch-icon.png" echo "icons ready in $ICONS"