forked from ndwarshuis/CinnXP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-theme
executable file
·83 lines (67 loc) · 1.84 KB
/
test-theme
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
help() {
cat << EOF
help: $0 options
Creates a test directory for gtk, cinnamon, metacity, and icon themes to do
live testing. This will bypass the need to compile everything for small
changes to these components
The first dir will be called "cinnxp_$flavor_testing" and will contain
symlinks to the proper files. Move this to ~/.themes or /usr/share/themes
The second dir will be called "cinnxp_$flavor_testing_icons" and will contain
links to the icon files. Move this to ~/.icons or /usr/share/icons
OPTIONS:
-h this...
-g Target gtk minor version. Default is "20" for gtk3.20 and higher
For Linux Mint 17.x and 18.x pass "10" or "18" respectively
-f Flavor to compile (full string name) Defaults to "luna"
Current valid options are "luna," "homestead," "metallic," "royale,"
"noir," "embedded," "zune," and "classic"
EOF
}
# TODO: this should be consolidated with compile-theme
gtk3_minor_revision=20
flavor="luna"
while getopts “hg:f:” OPTION
do
case $OPTION in
h)
help
exit 1
;;
g)
gtk3_minor_revision=$OPTARG
;;
f)
flavor=$OPTARG
;;
*)
break
;;
esac
done
# validate cmd line args
case "$gtk3_minor_revision" in
10|18|20)
;;
*)
echo "Invalid gtk versions requested."
help
exit
;;
esac
case "$flavor" in
"luna"|"homestead"|"metallic"|"royale"|"noir"|"embedded"|"zune"|"classic")
;;
*)
echo "Invalid flavor requested."
help
exit
;;
esac
test_dir="cinnxp_""$flavor""_testing"
mkdir "$test_dir"
ln -s "$PWD/theme-src/flavors/$flavor/cinnamon" "$test_dir/cinnamon"
ln -s "$PWD/theme-src/flavors/$flavor/gtk-2.0" "$test_dir/gtk-2.0"
ln -s "$PWD/theme-src/flavors/$flavor/gtk-3.$gtk3_minor_revision" "$test_dir/gtk-3.0"
ln -s "$PWD/theme-src/flavors/$flavor/metacity-1" "$test_dir/metacity-1"
ln -s "$PWD/icon-src" "$test_dir"_icons