#!/bin/sh # Makes the PNGs from the SVGs and social.html: run it after changing a logo. # It needs Chromium (CHROME=/path/to/chrome to say where) and ImageMagick. # Chromium won't make a window under 500 px, so the icons are drawn # large and shrunk. set -e cd "$(dirname "$0")" C=${CHROME:-chromium} shot() { # shot out.png width height page "$C" --headless --no-sandbox --hide-scrollbars --default-background-color=00000000 \ --screenshot="$1" --window-size="$2,$3" "file://$PWD/$4" >/dev/null 2>&1 } icon() { # icon svg out.png size printf '