You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
528 B
Bash
23 lines
528 B
Bash
|
7 years ago
|
#!/bin/bash
|
||
|
|
set -ueo pipefail
|
||
|
|
|
||
|
|
if [[ ! "$(command -v sassc)" ]]; then
|
||
|
|
echo "'sassc' needs to be installed to generate the CSS."
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
SASSC_OPT=('-M' '-t' 'expanded')
|
||
|
|
|
||
|
|
_COLOR_VARIANTS=('' '-dark')
|
||
|
|
|
||
|
|
if [[ -n "${COLOR_VARIANTS:-}" ]]; then
|
||
|
|
IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}"
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo "== Generating the CSS..."
|
||
|
|
|
||
|
|
for color in "${_COLOR_VARIANTS[@]}"; do
|
||
|
|
sassc "${SASSC_OPT[@]}" "src/gtk/3.0/gtk$color."{scss,css}
|
||
|
|
sassc "${SASSC_OPT[@]}" "src/gnome-shell/gnome-shell$color."{scss,css}
|
||
|
|
done
|