forked from nana-4/materia-theme
-
Notifications
You must be signed in to change notification settings - Fork 8
/
render-assets.sh
executable file
·61 lines (54 loc) · 910 Bytes
/
render-assets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
set -ueo pipefail
if [[ ! "$(command -v inkscape || command -v rendersvg)" ]]; then
echo "'inkscape' or 'resvg' needs to be installed to generate the PNG."
exit 1
fi
if [[ ! "$(command -v optipng)" ]]; then
echo "'optipng' needs to be installed to optimize the resulting PNG."
fi
chrome() (
cd src/chrome
./render-assets.sh
)
gtk() (
cd src/gtk-3.0
./render-assets.sh
)
gtk2_light() (
cd src/gtk-2.0
./render-assets.sh light
)
gtk2_dark() (
cd src/gtk-2.0
./render-assets.sh dark
)
case "${1:-}" in
"")
chrome
gtk
gtk2_light
gtk2_dark
;;
chrome)
chrome
;;
gtk)
gtk
;;
gtk2)
gtk2_light
gtk2_dark
;;
gtk2-light)
gtk2_light
;;
gtk2-dark)
gtk2_dark
;;
*)
echo "Unknown argument '$1'"
echo "Use 'chrome', 'gtk', 'gtk2', 'gtk2-light' or 'gtk2-dark' as an argument."
exit 1
;;
esac