summaryrefslogtreecommitdiffstats
path: root/meson/generate-stylesheets.py
blob: bd6b641b8ec57441b54ddf4d4bea147b7f311de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3

import os
from pathlib import PurePath
import subprocess

stylesheets = [
    'data/theme/gnome-shell-high-contrast.css',
    'data/theme/gnome-shell.css'
]

sourceroot = os.environ.get('MESON_SOURCE_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')

for stylesheet in stylesheets:
    stylesheet_path = PurePath(stylesheet)
    src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
    dst = PurePath(distroot, stylesheet_path)
    subprocess.run(['sassc', '-a', src, dst], check=True)