#!/bin/sh # Render the theme's PNGs from the SVGs and lunar-phase generator beside this script # (needs rsvg-convert and python3 with numpy + Pillow). set -e cd "$(dirname "$0")" for f in glow track fill; do rsvg-convert "$f.svg" -o "chandra/$f.png"; done py="" for candidate in python3 /usr/bin/python3; do if command -v "$candidate" >/dev/null 2>&1 && "$candidate" -c "import numpy, PIL" 2>/dev/null; then py="$candidate" break fi done if [ -z "$py" ]; then echo "render.sh: python3 with numpy and PIL is required" >&2 exit 1 fi "$py" ./render-phases.py