A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 render-asset.sh

View raw Download
text/x-shellscript • 785 B
Bourne-Again shell script, ASCII text executable
        
            
1
#! /bin/bash
2
set -ueo pipefail
3
4
INKSCAPE="/usr/bin/inkscape"
5
OPTIPNG="/usr/bin/optipng"
6
7
SRC_FILE="assets.svg"
8
ASSETS_DIR="assets"
9
10
i=${1}
11
12
if [ -f $ASSETS_DIR/$i.png ]; then
13
echo $ASSETS_DIR/$i.png exists.
14
else
15
echo Rendering $ASSETS_DIR/$i.png
16
$INKSCAPE --export-id=$i \
17
--export-id-only \
18
--export-png=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null \
19
&& $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png
20
fi
21
if [ -f $ASSETS_DIR/$i@2.png ]; then
22
echo $ASSETS_DIR/$i@2.png exists.
23
else
24
echo Rendering $ASSETS_DIR/$i@2.png
25
$INKSCAPE --export-id=$i \
26
--export-dpi=192 \
27
--export-id-only \
28
--export-png=$ASSETS_DIR/$i@2.png $SRC_FILE >/dev/null \
29
&& $OPTIPNG -o7 --quiet $ASSETS_DIR/$i@2.png
30
fi
31
32
exit 0
33