install.sh
Bourne-Again shell script, ASCII text executable
1
#!/bin/bash
2
3
repodir=$(cd $(dirname $0) && pwd)
4
srcdir=${repodir}/src
5
6
if type gnome-shell > /dev/null ; then
7
gnomever=$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -2)
8
else
9
gnomever=3.18
10
fi
11
12
echo
13
14
# Not enabled color: '-dark'
15
for color in '' '-light' ; do
16
for size in '' '-compact' ; do
17
echo Installing Flat-Plat${color}${size} ...
18
19
themedir=${destdir}/usr/share/themes/Flat-Plat${color}${size}
20
install -d ${themedir}
21
22
# Copy COPYING
23
cd ${repodir}
24
cp -ur \
25
COPYING \
26
${themedir}
27
28
# Install index.theme
29
cd ${srcdir}
30
cp -ur \
31
index${color}${size}.theme \
32
${themedir}/index.theme
33
34
# Install Chrome Theme/Extention
35
install -d ${themedir}/chrome
36
cd ${srcdir}/chrome
37
cp -ur \
38
"Flat-Plat Scrollbars.crx" \
39
"Flat-Plat${color} Theme.crx" \
40
${themedir}/chrome
41
42
# Install GNOME Shell Theme
43
install -d ${themedir}/gnome-shell
44
cd ${srcdir}/gnome-shell/${gnomever}
45
cp -ur \
46
extensions \
47
no-events.svg \
48
no-notifications.svg \
49
process-working.svg \
50
${themedir}/gnome-shell
51
if [ "$color" == '-dark' ] ; then
52
cp -ur \
53
assets${color} \
54
${themedir}/gnome-shell/assets
55
else
56
cp -ur \
57
assets \
58
${themedir}/gnome-shell
59
fi
60
cp -ur \
61
gnome-shell${color}${size}.css \
62
${themedir}/gnome-shell/gnome-shell.css
63
glib-compile-resources \
64
--sourcedir=${themedir}/gnome-shell \
65
--target=${themedir}/gnome-shell/gnome-shell-theme.gresource \
66
gnome-shell-theme.gresource.xml
67
68
# Install GTK+ 2 Theme
69
install -d ${themedir}/gtk-2.0
70
cd ${srcdir}/gtk-2.0
71
cp -ur \
72
apps.rc \
73
main.rc \
74
${themedir}/gtk-2.0
75
if [ "$color" == '-dark' ] ; then
76
cp -ur \
77
assets${color} \
78
${themedir}/gtk-2.0/assets
79
else
80
cp -ur \
81
assets \
82
${themedir}/gtk-2.0
83
fi
84
cp -ur \
85
gtkrc${color} \
86
${themedir}/gtk-2.0/gtkrc
87
88
# Install GTK+ 3 Theme
89
for version in '3.18' '3.20' '3.22' ; do
90
if [ "$version" == '3.18' ] ; then
91
install -d ${themedir}/gtk-3.0
92
cd ${srcdir}/gtk-3.0/${version}
93
cp -ur \
94
assets \
95
${themedir}/gtk-3.0
96
cp -ur \
97
gtk${color}.css \
98
${themedir}/gtk-3.0/gtk.css
99
if [ "$color" == '-dark' ] ; then
100
:
101
else
102
cp -ur \
103
gtk-dark.css \
104
${themedir}/gtk-3.0
105
fi
106
else
107
install -d ${themedir}/gtk-${version}
108
cd ${srcdir}/gtk-3.0/${version}
109
cp -ur \
110
assets \
111
${themedir}/gtk-${version}
112
cp -ur \
113
gtk${color}${size}.css \
114
${themedir}/gtk-${version}/gtk.css
115
if [ "$color" == '-dark' ] ; then
116
:
117
else
118
cp -ur \
119
gtk-dark${size}.css \
120
${themedir}/gtk-${version}/gtk-dark.css
121
fi
122
fi
123
done
124
125
install -d ${themedir}/gtk-common
126
cd ${srcdir}/gtk-3.0/gtk-common
127
cp -ur \
128
assets \
129
${themedir}/gtk-common
130
131
# Install Metacity Theme
132
install -d ${themedir}/metacity-1
133
cd ${srcdir}/metacity-1
134
cp -ur \
135
*.svg \
136
${themedir}/metacity-1
137
if [ "$color" == '-light' ] ; then
138
cp -ur \
139
metacity-theme-2${color}.xml \
140
${themedir}/metacity-1/metacity-theme-2.xml
141
cp -ur \
142
metacity-theme-3${color}.xml \
143
${themedir}/metacity-1/metacity-theme-3.xml
144
else
145
cp -ur \
146
metacity-theme-2.xml \
147
metacity-theme-3.xml \
148
${themedir}/metacity-1
149
fi
150
151
# Install Unity Theme
152
install -d ${themedir}/unity
153
cd ${srcdir}/unity
154
cp -ur \
155
*.svg \
156
*.png \
157
*.json \
158
${themedir}/unity
159
if [ "$color" == '-light' ] ; then
160
cp -urT \
161
buttons${color} \
162
${themedir}/unity/buttons
163
else
164
cp -ur \
165
buttons \
166
${themedir}/unity
167
fi
168
done
169
done
170
171
echo
172
echo Done.
173