Mercurial > repos > other > Adwaita-Dark-Green
annotate gtk-3.18/render-assets.sh @ 41:d49665775e8b
Try incorporating 3.22 into 3.20 for multi-version compat without separate folders
This seems to work without warnings on 3.20 - needs testing on 3.22
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 15 Mar 2017 20:17:42 +0000 |
parents | cb3e1a45b770 |
children |
rev | line source |
---|---|
22
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 #! /bin/bash |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
3 INKSCAPE="/usr/bin/inkscape" |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 OPTIPNG="/usr/bin/optipng" |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 SRC_FILE="assets.svg" |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 ASSETS_DIR="assets" |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 INDEX="assets.txt" |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 for i in `cat $INDEX` |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 do |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 if [ -f $ASSETS_DIR/$i.png ]; then |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 echo $ASSETS_DIR/$i.png exists. |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 else |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 echo |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 echo Rendering $ASSETS_DIR/$i.png |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 $INKSCAPE --export-id=$i \ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 --export-id-only \ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 --export-png=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null #\ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 # && $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 fi |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 if [ -f $ASSETS_DIR/$i@2.png ]; then |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 echo $ASSETS_DIR/$i@2.png exists. |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 else |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 echo |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 echo Rendering $ASSETS_DIR/$i@2.png |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 $INKSCAPE --export-id=$i \ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 --export-dpi=180 \ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 --export-id-only \ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 --export-png=$ASSETS_DIR/$i@2.png $SRC_FILE >/dev/null #\ |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
31 # && $OPTIPNG -o7 --quiet $ASSETS_DIR/$i@2.png |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 fi |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
33 done |
cb3e1a45b770
Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
34 exit 0 |