render-asset.sh
Bourne-Again shell script, ASCII text executable
1
#!/bin/bash
2
set -ueo pipefail
3
4
INKSCAPE="$(which inkscape)"
5
OPTIPNG="$(which optipng)"
6
7
i="$1"
8
9
echo "Rendering '$i.png'"
10
"$INKSCAPE" --export-png="$i.png" "$i.svg" >/dev/null \
11
&& "$OPTIPNG" -o7 --quiet "$i.png"
12