]> git.ktnx.net Git - mobile-ledger.git/blob - tools/populate-app-icon
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / tools / populate-app-icon
1 #!/bin/sh
2
3 set -e
4 set -u
5
6 ROOT_DIR=$(dirname $(realpath "$0"))/..
7 ART_DIR="$ROOT_DIR/art"
8 RES_DIR="$ROOT_DIR/app/src/main/res"
9 ICON_ART="$ART_DIR/app-icon.svg"
10
11 gen_icons() {
12     while read size name; do
13         DST_DIR="$RES_DIR/mipmap-$name"
14         mkdir -p "$DST_DIR"
15         DST="$DST_DIR/ic_launcher.png"
16         rsvg-convert --background-color none "$ICON_ART" -w $size -h $size \
17             -o "$DST"
18         optipng "$DST"
19     done
20 }
21
22 cat <<EOF | gen_icons
23 36 ldpi
24 48 mdpi
25 64 tvdpi
26 72 hdpi
27 96 xhdpi
28 144 xxhdpi
29 192 xxxhdpi
30 EOF