mirror of
https://github.com/jestr-ai/jestr-apps.git
synced 2026-08-12 08:24:10 +02:00
29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Rasterises the jestr icon sources into the PNGs the manifest ships.
|
|
#
|
|
# assets/icon.svg -> public/icon-48.png, public/icon-128.png
|
|
# assets/icon-small.svg -> public/icon-16.png, public/icon-32.png
|
|
#
|
|
# Both sources are generated by scripts/refit-hat.py from assets/hat-trace.svg; run
|
|
# that first if the trace changed. The small sizes come from their own source
|
|
# because the hat is wide and squat: fitted whole it uses under half a square
|
|
# box's height, so the small master crops it wider and thickens the hairlines.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if ! command -v rsvg-convert >/dev/null 2>&1; then
|
|
echo "error: rsvg-convert not found. Install it with: brew install librsvg" >&2
|
|
exit 1
|
|
fi
|
|
|
|
for size in 16 32; do
|
|
rsvg-convert -w "$size" -h "$size" assets/icon-small.svg -o "public/icon-$size.png"
|
|
echo "public/icon-$size.png"
|
|
done
|
|
|
|
for size in 48 128; do
|
|
rsvg-convert -w "$size" -h "$size" assets/icon.svg -o "public/icon-$size.png"
|
|
echo "public/icon-$size.png"
|
|
done
|