forked from vinceliuice/Mojave-gtk-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse-sass.sh
executable file
·48 lines (40 loc) · 1.42 KB
/
parse-sass.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
#! /bin/bash
if [ ! "$(which sassc 2> /dev/null)" ]; then
echo sassc needs to be installed to generate the css.
exit 1
fi
SASSC_OPT="-M -t expanded"
_COLOR_VARIANTS=('-light' '-dark')
if [ ! -z "${COLOR_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}"
fi
_TRANS_VARIANTS=('' '-solid')
if [ ! -z "${TRANS_VARIANTS:-}" ]; then
IFS=', ' read -r -a _TRANS_VARIANTS <<< "${TRANS_VARIANTS:-}"
fi
_ALT_VARIANTS=('' '-alt')
if [ ! -z "${ALT_VARIANTS:-}" ]; then
IFS=', ' read -r -a _THIN_VARIANTS <<< "${ALT_VARIANTS:-}"
fi
_SMALL_VARIANTS=('' '-small')
if [ ! -z "${SMALL_VARIANTS:-}" ]; then
IFS=', ' read -r -a _THIN_VARIANTS <<< "${SMALL_VARIANTS:-}"
fi
for color in "${_COLOR_VARIANTS[@]}"; do
for trans in "${_TRANS_VARIANTS[@]}"; do
for alt in "${_ALT_VARIANTS[@]}"; do
for small in "${_SMALL_VARIANTS[@]}"; do
sassc $SASSC_OPT src/gtk-3.0/gtk${compact}${color}${trans}${alt}${small}.{scss,css}
echo "==> Generating the gtk${compact}${color}${trans}${alt}${small}.css..."
done
done
done
done
for color in "${_COLOR_VARIANTS[@]}"; do
for trans in "${_TRANS_VARIANTS[@]}"; do
sassc $SASSC_OPT src/gnome-shell/gnome-shell${color}${trans}.{scss,css}
echo "==> Generating the gnome-shell${color}${trans}.css..."
sassc $SASSC_OPT src/cinnamon/cinnamon${color}${trans}.{scss,css}
echo "==> Generating the cinnamon${color}${trans}.css..."
done
done