forked from nana-4/materia-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse-sass.sh
executable file
·40 lines (31 loc) · 1.14 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
#!/bin/bash
set -ueo pipefail
if [ ! "$(which sassc 2> /dev/null)" ]; then
echo sassc needs to be installed to generate the css.
exit 1
fi
_COLOR_VARIANTS=('' '-dark' '-light')
if [ ! -z "${COLOR_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}"
fi
_SIZE_VARIANTS=('' '-compact')
if [ ! -z "${SIZE_VARIANTS:-}" ]; then
IFS=', ' read -r -a _SIZE_VARIANTS <<< "${SIZE_VARIANTS:-}"
fi
SASSC_OPT="-M -t expanded"
echo "== Generating the CSS..."
for color in "${_COLOR_VARIANTS[@]}"; do
# The '-compact' variant is not supported for gtk '3.18'
sassc $SASSC_OPT src/gtk/3.18/gtk${color}.{scss,css}
for size in "${_SIZE_VARIANTS[@]}"; do
for version in '3.20' '3.22'; do
sassc $SASSC_OPT src/gtk/${version}/gtk${color}${size}.{scss,css}
done
# This gnome-shell theme can skip versions '3.20' & '2.22'
for version in '3.18' '3.24' '3.26' '3.28'; do
sassc $SASSC_OPT src/gnome-shell/${version}/gnome-shell${color}${size}.{scss,css}
done
done
done
sassc $SASSC_OPT src/chrome/chrome-scrollbar/scrollbars.{scss,css}
sassc $SASSC_OPT src/chrome/chrome-scrollbar-dark/scrollbars.{scss,css}