A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 render-assets.sh

View raw Download
text/x-shellscript • 772 B
Bourne-Again shell script, ASCII text executable
        
            
1
#!/usr/bin/env bash
2
set -ueo pipefail
3
4
if [[ ! "$(command -v inkscape || command -v rendersvg)" ]]; then
5
echo "'inkscape' or 'resvg' needs to be installed to generate the PNG."
6
exit 1
7
fi
8
9
if [[ ! "$(command -v optipng)" ]]; then
10
echo "'optipng' needs to be installed to optimize the resulting PNG."
11
fi
12
13
gtk() (
14
cd src/gtk-3.0
15
./render-assets.sh
16
)
17
18
gtk2_light() (
19
cd src/gtk-2.0
20
./render-assets.sh light
21
)
22
23
gtk2_dark() (
24
cd src/gtk-2.0
25
./render-assets.sh dark
26
)
27
28
case "${1:-}" in
29
"")
30
gtk
31
gtk2_light
32
gtk2_dark
33
;;
34
gtk)
35
gtk
36
;;
37
gtk2)
38
gtk2_light
39
gtk2_dark
40
;;
41
gtk2-light)
42
gtk2_light
43
;;
44
gtk2-dark)
45
gtk2_dark
46
;;
47
*)
48
echo "Unknown argument '$1'"
49
echo "Use 'gtk', 'gtk2', 'gtk2-light' or 'gtk2-dark' as an argument."
50
exit 1
51
;;
52
esac
53